-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[Fix][4.1.x] Add HttpOnly support CookieRetrievingCookieGenerator #1769
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
Conversation
Also, you can't quite freely set that flag because you need to ensure the container supports that method based on the servlet spec. 4.1 does not have that requirement so there are additional checks in place to ensure CAS wont crash. |
@mmoayyed thanks for the quick comments.
In |
Ah I see what you mean. So let me ask: When remember-me is set, and this call is executed: Does |
No, it does not. Here is the reference. In my temporary fix for our own server, we override the |
Cool. Thanks for the update. Investigate away :) |
Here is what I learned after further investigation. Hope it is helpful :).
The container check need to be removed from the constructor and be placed at wherever we set
|
Looks good to me. Could you update the pull with the proposed changed? That should provide a clearer view on how things are organized. |
Sure. |
Ready for review. |
Great. Looks fine. Would 8000 you be willing to submit the same changeset over to 4.2.x and master? Or would you rather just do one? Or would you rather we port things forward manually by cherry picking? |
Sure, I can do both. I will let you know if I run into any issues. |
@[Updated] From TGC to CASPRIVACY: |
Thanks! |
…ereo#1769) * Add HttpOnly to class CookieRetrievingCookieGenerator. * Add container check for HttpOnly in addCookie() and improve the logic. * Explicitly set cookieHttpOnly to true for CASPRIVACY
Version
4.1.x
Issue
Current
CookieRetrievingCookieGenerator
does not setHttpOnly
flag whenRememberMe
is true.Fix
Move the
HttpOnly
container check from the constructor toaddCookie()
where settingHttpOnly
flag is added.Limitations & Side effects
Need to explicitly set
cookieHttpOnly=true
inwarnCookieGenerator.xml
forCASPRIVACY
.Issues & Other PR
No active related issue or open PR found.
References
HttpOnly
in CookieGenerator