Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Default PUSH_REGISTRATION_ENCRYPTION_KEYS to empty dict.

Prakhar Pratyush781e373fd770
diff --git a/zilencer/views.py b/zilencer/views.py
index 2a7cd6a2ea1..4c49c1f0f2b 100644
--- a/zilencer/views.py
+++ b/zilencer/views.py
@@ -587,7 +587,6 @@ def do_register_remote_push_device(
) -> int:
assert (realm is None) ^ (remote_realm is None)
- assert settings.PUSH_REGISTRATION_ENCRYPTION_KEYS
if bouncer_public_key not in settings.PUSH_REGISTRATION_ENCRYPTION_KEYS:
raise InvalidBouncerPublicKeyError
diff --git a/zproject/computed_settings.py b/zproject/computed_settings.py
index 6d8110fbedb..d8bd8761189 100644
--- a/zproject/computed_settings.py
+++ b/zproject/computed_settings.py
@@ -101,7 +101,7 @@ ZULIP_ORG_KEY = get_secret("zulip_org_key")
ZULIP_ORG_ID = get_secret("zulip_org_id")
raw_keys: str | None = get_secret("push_registration_encryption_keys")
-PUSH_REGISTRATION_ENCRYPTION_KEYS: dict[str, str] | None = None
+PUSH_REGISTRATION_ENCRYPTION_KEYS: dict[str, str] = {}
if raw_keys is not None:
PUSH_REGISTRATION_ENCRYPTION_KEYS = json.loads(raw_keys)