mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
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:
parent
d4769ec0a5
commit
c06e1a91c9
1 changed files with 1 additions and 1 deletions
|
@ -388,7 +388,7 @@ class _ActionsMapPlugin:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
authenticator.get_session_cookie()
|
authenticator.get_session_cookie()
|
||||||
except KeyError:
|
except Exception:
|
||||||
raise HTTPResponse(m18n.g("not_logged_in"), 401)
|
raise HTTPResponse(m18n.g("not_logged_in"), 401)
|
||||||
else:
|
else:
|
||||||
# Delete cookie and clean the session
|
# Delete cookie and clean the session
|
||||||
|
|
Loading…
Add table
Reference in a new issue