-
Notifications
You must be signed in to change notification settings - Fork 878
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
Set a limit on cookie expiration #1905
Conversation
@bridiver I forgot to mark this as a draft PR, but basically, at this point, I just want to get feedback on whether or not you think this is a reasonable approach. I will add tests before landing. |
cecb60e
to
f9cc70b
Compare
The client-side cookie (i.e. document.cookie API) expiry limit is based off of the limit set by both Safari and Firefox: https://webkit.org/blog/8613/intelligent-tracking-prevention-2-1/ https://groups.google.com/forum/#!msg/mozilla.dev.platform/lECBPeiGTy4/cPP52vyZAwAJ whereas the server-side cookie (i.e. Set-Cookie header) limit was picked to avoid interfering in a noticeable way with user logins.
@darkdh I made all of the changes you requested and switched to an override approach. I also added a unit test which covers the same test cases as my manual test page. |
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.
++
The client-side cookie (i.e. document.cookie API) expiry limit is based off of the limit set by both Safari and Firefox:
https://webkit.org/blog/8613/intelligent-tracking-prevention-2-1/
https://groups.google.com/forum/#!msg/mozilla.dev.platform/lECBPeiGTy4/cPP52vyZAwAJ
whereas the server-side cookie (i.e. Set-Cookie header) limit was picked to avoid interfering in a noticeable way with user logins.
Resolves brave/brave-browser#3443.
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests
) onnpm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Use the following test pages and examine the state of the cookie jar using the devtools:
Reviewer Checklist: