mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 16:21:00 -05:00
Avoid attribute error when password_config present but empty (#6753)
The old statement returned `None` for such a `password_config` (like the one created on first run), thus retrieval of the `pepper` key failed with `AttributeError`. Fixes #5315 Signed-off-by: Ivan Vilata i Balaguer <ivan@selidor.net>
This commit is contained in:
parent
07124d028d
commit
837f62266b
2 changed files with 2 additions and 1 deletions
|
|
@ -52,7 +52,7 @@ if __name__ == "__main__":
|
|||
if "config" in args and args.config:
|
||||
config = yaml.safe_load(args.config)
|
||||
bcrypt_rounds = config.get("bcrypt_rounds", bcrypt_rounds)
|
||||
password_config = config.get("password_config", {})
|
||||
password_config = config.get("password_config", None) or {}
|
||||
password_pepper = password_config.get("pepper", password_pepper)
|
||||
password = args.password
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue