mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-27 03:58:06 +03:00
Fix fallback to signing key for macaroon-secret-key
This commit is contained in:
parent
67dbe4c899
commit
353f2407b7
1 changed files with 2 additions and 2 deletions
|
@ -57,8 +57,8 @@ class KeyConfig(Config):
|
||||||
# Unfortunately, there are people out there that don't have this
|
# Unfortunately, there are people out there that don't have this
|
||||||
# set. Lets just be "nice" and derive one from their secret key.
|
# set. Lets just be "nice" and derive one from their secret key.
|
||||||
logger.warn("Config is missing missing macaroon_secret_key")
|
logger.warn("Config is missing missing macaroon_secret_key")
|
||||||
seed = self.signing_key[0].seed
|
seed = bytes(self.signing_key[0])
|
||||||
self.macaroon_secret_key = hashlib.sha256(seed)
|
self.macaroon_secret_key = hashlib.sha256(seed).digest()
|
||||||
|
|
||||||
self.expire_access_token = config.get("expire_access_token", False)
|
self.expire_access_token = config.get("expire_access_token", False)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue