Skip to content

Commit

Permalink
auth: prevent stupid issue where outdated cookie usage would trigger …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
alexAubin committed Jul 10, 2023
1 parent d4769ec commit c06e1a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moulinette/interfaces/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def logout(self):

try:
authenticator.get_session_cookie()
except KeyError:
except Exception:
raise HTTPResponse(m18n.g("not_logged_in"), 401)
else:
# Delete cookie and clean the session
Expand Down

0 comments on commit c06e1a9

Please sign in to comment.