datasette-secrets 0.1a3__py3-none-any.whl → 0.1a4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of datasette-secrets might be problematic. Click here for more details.

@@ -23,6 +23,9 @@ async def get_secret(datasette, secret_name, actor_id=None):
23
23
  return os.environ[env_var]
24
24
  # Now look it up in the database
25
25
  config = get_config(datasette)
26
+ if config is None:
27
+ return None
28
+ encryption_key = config["encryption_key"]
26
29
  db = get_database(datasette)
27
30
  try:
28
31
  db_secret = (
@@ -35,7 +38,7 @@ async def get_secret(datasette, secret_name, actor_id=None):
35
38
  return None
36
39
  if not db_secret:
37
40
  return None
38
- key = Fernet(config["encryption_key"].encode("utf-8"))
41
+ key = Fernet(encryption_key.encode("utf-8"))
39
42
  decrypted = key.decrypt(db_secret["encrypted"])
40
43
  # Update the last used timestamp and actor_id
41
44
  params = (actor_id, db_secret["id"])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datasette-secrets
3
- Version: 0.1a3
3
+ Version: 0.1a4
4
4
  Summary: Manage secrets such as API keys for use with other Datasette plugins
5
5
  Author: Datasette
6
6
  License: Apache-2.0
@@ -0,0 +1,10 @@
1
+ datasette_secrets/__init__.py,sha256=rGTD35WFjkP8uqoW_L5pGBxUqFITGtkg2wQ3glZLP9U,10587
2
+ datasette_secrets/hookspecs.py,sha256=57v14e2Y4o5eZyAgCLpuzp1KZn7CjwLXeKwfq6Zvux8,205
3
+ datasette_secrets/templates/secrets_index.html,sha256=ZgIy_huFZQfnI6GjO0qauWEkTWhkBCM5WrT73Nqq4BY,1737
4
+ datasette_secrets/templates/secrets_update.html,sha256=qMPLVCuKKslqw_In0aSCVobB3maPw9oaYZDQQImdRIU,1678
5
+ datasette_secrets-0.1a4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
6
+ datasette_secrets-0.1a4.dist-info/METADATA,sha256=HLoZKAlUAhUprGl70egXMaDzi58YZJLn5hJcbLjGqxY,7040
7
+ datasette_secrets-0.1a4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
8
+ datasette_secrets-0.1a4.dist-info/entry_points.txt,sha256=2083uWbPpGntxRulh8_hVaelQO-xdtjedG6rGzwPUH0,40
9
+ datasette_secrets-0.1a4.dist-info/top_level.txt,sha256=ZBJKQk-DdDU9Vnwu4x79X9aaEulwGJMoLx62IZJPDaQ,18
10
+ datasette_secrets-0.1a4.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- datasette_secrets/__init__.py,sha256=9OBdUnpRpA6nQOoh-gerQO4vpGclFwTevyprvSDaPn8,10508
2
- datasette_secrets/hookspecs.py,sha256=57v14e2Y4o5eZyAgCLpuzp1KZn7CjwLXeKwfq6Zvux8,205
3
- datasette_secrets/templates/secrets_index.html,sha256=ZgIy_huFZQfnI6GjO0qauWEkTWhkBCM5WrT73Nqq4BY,1737
4
- datasette_secrets/templates/secrets_update.html,sha256=qMPLVCuKKslqw_In0aSCVobB3maPw9oaYZDQQImdRIU,1678
5
- datasette_secrets-0.1a3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
6
- datasette_secrets-0.1a3.dist-info/METADATA,sha256=pVAqjHANB1qUe6ltVsV0-JEqFeTGbKsLO_jx17z7xlU,7040
7
- datasette_secrets-0.1a3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
8
- datasette_secrets-0.1a3.dist-info/entry_points.txt,sha256=2083uWbPpGntxRulh8_hVaelQO-xdtjedG6rGzwPUH0,40
9
- datasette_secrets-0.1a3.dist-info/top_level.txt,sha256=ZBJKQk-DdDU9Vnwu4x79X9aaEulwGJMoLx62IZJPDaQ,18
10
- datasette_secrets-0.1a3.dist-info/RECORD,,