auth: prevent stupid issue where outdated cookie usage would trigger error 500 intead of 401, resulting in a ~bug after Yunohost self-upgrade and the webadmin is confused about the API not being up again

This commit is contained in:
Alexandre Aubin 2023-07-10 21:28:54 +02:00
parent d4769ec0a5
commit c06e1a91c9

View file

@ -388,7 +388,7 @@ class _ActionsMapPlugin:
try:
authenticator.get_session_cookie()
except KeyError:
except Exception:
raise HTTPResponse(m18n.g("not_logged_in"), 401)
else:
# Delete cookie and clean the session