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 14:12:50 +0000
committerRichard van der Hoff <richard@matrix.org>2019-01-10 14:12:50 +0000
commite0910d01450fea79fc34f1882c293b026e2bd717 (patch)
tree33ea25377ca99c0eff44123d9539531d7ae8fd14 /synapse/config
parentfix docker build to install optional deps (diff)
parentRevert "Fix macaroon_secret_key fallback logic" (diff)
downloadsynapse-e0910d01450fea79fc34f1882c293b026e2bd717.tar.xz
Merge branch rav/macaroon_key_fix_0.34 into rav/macaroon_key_fix_0.34.1
Fixes #4371
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/key.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/config/key.py b/synapse/config/key.py
index 53f48fe2dd..3b11f0cfa9 100644
--- a/synapse/config/key.py
+++ b/synapse/config/key.py
@@ -57,8 +57,8 @@ class KeyConfig(Config):
             # Unfortunately, there are people out there that don't have this
             # set. Lets just be "nice" and derive one from their secret key.
             logger.warn("Config is missing missing macaroon_secret_key")
-            seed = self.signing_key[0].seed
-            self.macaroon_secret_key = hashlib.sha256(seed)
+            seed = bytes(self.signing_key[0])
+            self.macaroon_secret_key = hashlib.sha256(seed).digest()
 
         self.expire_access_token = config.get("expire_access_token", False)