-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #12241 Restore SameSite config as session cookie comment. #12263
Issue #12241 Restore SameSite config as session cookie comment. #12263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use HttpCookieFacade methods instead.
jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/SessionHandler.java
Outdated
Show resolved
Hide resolved
if (comment.contains(SAME_SITE_NONE_COMMENT)) | ||
_sessionManager.setSameSite(HttpCookie.SameSite.NONE); | ||
if (comment.contains(PARTITIONED_COMMENT)) | ||
_sessionManager.setPartitioned(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the techniques in HttpCookieFacade here.
Bonus is that you can even get a clean comment field too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the now unused constants?
protected static final String SAME_SITE_COMMENT = "__SAME_SITE_"; | ||
protected static final String SAME_SITE_NONE_COMMENT = SAME_SITE_COMMENT + "NONE__"; | ||
protected static final String SAME_SITE_LAX_COMMENT = SAME_SITE_COMMENT + "LAX__"; | ||
protected static final String SAME_SITE_STRICT_COMMENT = SAME_SITE_COMMENT + "STRICT__"; | ||
protected static final String PARTITIONED_COMMENT = "__PARTITIONED__"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These constants are no longer needed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
User reported not being able set
SameSite
via old jetty session cookie comment mechanism. This PR restores that, but only for ee8 and ee9.