Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix fallback to signing key for macaroon-secret-key
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Jan 10, 2019
1 parent 67dbe4c commit 353f240
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/config/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def read_config(self, 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)

Expand Down

0 comments on commit 353f240

Please sign in to comment.