0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 20:23:52 +01:00

Fix fallback to signing key for macaroon-secret-key

This commit is contained in:
Richard van der Hoff 2019-01-10 12:31:25 +00:00
parent 67dbe4c899
commit 353f2407b7

View file

@ -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)