Not sure when that started to happen, but bottle will return an empty dict if no valid session cookie found, this shall trigger an exception

This commit is contained in:
Alexandre Aubin 2021-12-23 16:55:12 +01:00
parent f49f03d11e
commit 6aaf47493d

View file

@ -109,6 +109,9 @@ class Authenticator(BaseAuthenticator):
return {"id": random_ascii()}
raise YunohostAuthenticationError("unable_authenticate")
if not infos and raise_if_no_session_exists:
raise YunohostAuthenticationError("unable_authenticate")
if "id" not in infos:
infos["id"] = random_ascii()