Skip to content

Commit

Permalink
Reset tokens on login error (#810)
Browse files Browse the repository at this point in the history
also clear csrf token and cookies.

Closes #442.  

* Remove version changes

---------

Co-authored-by: Lauren Haaitsma <lauren.haaitsma@kb.nl>
Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
  • Loading branch information
3 people authored Jan 16, 2024
1 parent 38ce89a commit 4f78f81
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ protected void login(String username, String password, ILogin loginFunction) thr
loginFunction.login(token, username, password);
} catch (NeedLoginTokenException | TokenErrorException e) { // try once more
clearToken("login");
clearToken("csrf");
clearCookies();
token = getOrFetchToken("login");
loginFunction.login(token, username, password);
}
Expand Down

0 comments on commit 4f78f81

Please sign in to comment.