summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-01-10 12:41:56 +0000
committerRichard van der Hoff <richard@matrix.org>2019-01-10 12:57:27 +0000
commitefc522c55e996e420271de2d9094835dda52ade4 (patch)
tree3f404ada671b082fa9b03c2575f07f8a3cdd5a46 /synapse/config
parentSkip macaroon check for access tokens in the db (diff)
downloadsynapse-efc522c55e996e420271de2d9094835dda52ade4.tar.xz
Fix macaroon_secret_key fallback logic
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/key.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/config/key.py b/synapse/config/key.py
index a7998c941d..c26b7529f2 100644
--- a/synapse/config/key.py
+++ b/synapse/config/key.py
@@ -71,14 +71,14 @@ class KeyConfig(Config):
         base_key_name = os.path.join(config_dir_path, server_name)
 
         if is_generating_file:
-            macaroon_secret_key = random_string_with_symbols(50)
+            macaroon_secret_key = '"%s"' % random_string_with_symbols(50)
             form_secret = '"%s"' % random_string_with_symbols(50)
         else:
-            macaroon_secret_key = None
+            macaroon_secret_key = 'null'
             form_secret = 'null'
 
         return """\
-        macaroon_secret_key: "%(macaroon_secret_key)s"
+        macaroon_secret_key: %(macaroon_secret_key)s
 
         # Used to enable access token expiration.
         expire_access_token: False