Closed cbxp closed 6 years ago
Currently, when calling Session#clear, cookie domain is not set when it was set previously, thus cookie is not deleted in the client.
Session#clear
Here's how to reproduce it:
1) Configure cookie domain
# conf/application.conf application.cookie.domain=cookie-domain.com
2) Create a session
session.put("foo", "bar");
3) Clear session
session.clear();
Expected: Cookie is deleted in the browser.
Actual: Cookie is not deleted because cookie domain is not set when "clearing" cookie.
We are using currently version 5.2.2, but it also seems to exist in master (didn't verify yet): https://github.com/ninjaframework/ninja/blob/develop/ninja-core/src/main/java/ninja/session/SessionImpl.java#L223-L235
5.2.2
Very nice report - that's absolutely true and a bug! We'll fix that asap...
Hey @cbxp - could you check that https://github.com/ninjaframework/ninja/pull/463 fixes the issue? Thanks!
Currently, when calling
Session#clear
, cookie domain is not set when it was set previously, thus cookie is not deleted in the client.Here's how to reproduce it:
1) Configure cookie domain
2) Create a session
3) Clear session
Expected: Cookie is deleted in the browser.
Actual: Cookie is not deleted because cookie domain is not set when "clearing" cookie.
We are using currently version
5.2.2
, but it also seems to exist in master (didn't verify yet): https://github.com/ninjaframework/ninja/blob/develop/ninja-core/src/main/java/ninja/session/SessionImpl.java#L223-L235