Skip to content

Commit

Permalink
Always use a new CookieManager instead of the default
Browse files Browse the repository at this point in the history
  • Loading branch information
melissalinkert committed Mar 13, 2024
1 parent 4e819fe commit a1da8fc
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,8 @@ public void run() {

String authenticate(final PasswordAuthentication authentication, final int serverID) throws Exception {
var handler = CookieHandler.getDefault();
if (handler == null) {
handler = new CookieManager(null, CookiePolicy.ACCEPT_ALL);
CookieHandler.setDefault(handler);
}
handler = new CookieManager(null, CookiePolicy.ACCEPT_ALL);
CookieHandler.setDefault(handler);

if (this.token == null)
this.token = getCSRFToken();
Expand Down

0 comments on commit a1da8fc

Please sign in to comment.