-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
LibWeb: Implement Clear-Site-Data HTTP response header #6887
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
base: master
Are you sure you want to change the base?
Conversation
| page.client().page_did_set_cookie(url, cookie.value(), Cookie::Source::Http); // FIXME: Determine cookie source correctly | ||
| } | ||
|
|
||
| // https://www.w3.org/TR/clear-site-data/#parsing |
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.
Could you first make sure your using the editor's draft of this spec?
I.e. https://w3c.github.io/webappsec-clear-site-data/
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.
Will do.
| void WebContentClient::did_clear_all_cookies(URL::URL url) | ||
| { | ||
| (void)url; | ||
| Application::cookie_jar().expire_cookies_accessed_since(UnixDateTime::from_seconds_since_epoch(0)); |
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.
I haven't thoroughly looked at this patch, but this caught my eye - I really do not want a single site sending a Clear-Site-Data header to delete all of my cookies.
Imagine github.com sending this header and suddenly you're logged out of youtube.com.
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.
yep, I understand that. I was trying to stay within scope for this PR (added the fixme noting per origin clearing needed to be implemented). If it's no problem, then I can implement the per origin clearing before resubmitting.
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.
This should definitely not clear everything; please update the PR to do this per origin instead.
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.
Will do
a4ff190 to
ea81fe9
Compare
|
I am resubmitting with code that clears cookies per origin and with the editor's draft url for the spec. |
|
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest |
ea81fe9 to
3a79d60
Compare
Add support for parsing and processing the Clear-Site-Data HTTP response header per W3C specification. This causes the navigation.https.html WPT test to go from timeout to pass.
3a79d60 to
8718354
Compare
Add support for parsing and processing the Clear-Site-Data HTTP response header per W3C specification. This causes the navigation.https.html WPT test to go from timeout to pass.
Implemented:
"cache","cookies","storage","*"directivesNot implemented:
Testing:
WPT test
clear-site-data/navigation.https.htmlpasses via browser runner (./Meta/ladybird.py).