Improve config comments and errors with mbc auth

This commit is contained in:
Tulir Asokan 2021-11-19 15:41:14 +02:00
parent 61711e8329
commit 8c3e3a3255
5 changed files with 50 additions and 31 deletions

View file

@ -55,7 +55,10 @@ class Config(BaseFileConfig):
base["server.unshared_secret"] = self._new_token()
else:
base["server.unshared_secret"] = shared_secret
copy("registration_secrets")
if "registration_secrets" in self:
base["homeservers"] = self["registration_secrets"]
else:
copy("homeservers")
copy("admins")
for username, password in base["admins"].items():
if password and not bcrypt_regex.match(password):