Repository navigation
correctly send secure cookies after hsts url match - #9780
Conversation
Fix for servo#8100, where sites in the hsts list were not recieving secure cookies if the site was originally loading using a plain http url.
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @mbrubeck (or someone else) soon. |
|
Thank you for finding and solving this! I've filed #9783 to ensure we're not making this mistake in other places, too. |
|
@bors-servo: r+ |
|
📌 Commit 759099c has been approved by |
correctly send secure cookies after hsts url match Fix for #8100, where sites in the hsts list were not recieving secure cookies if the site was originally loading using a plain http url. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9780) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-wpt |
We should look into why this test now fails with this change. |
Changed hostname rewrite to happen inside obtain response after any htst changes. Removed url from load leaving just doc_url to avoid confusion
|
As discussed on IRC, the test was failing due to the hostname being modified by the HOST file entry in the test runner. This meant the cookies were incorrectly failing to match the host in the updated request cookies method, and not being sent. Tried updating the code to move hostname changes inside obtain_response and remove the duplicate urls. Ran this against the unit tests and WPT tests, I get some failures and timeouts on WPT but I get the same failures on master. I tried to test github site itself but I can't seem to press the final login button as the browser won't react to it. |
| send_request_to_devtools( | ||
| devtools_chan.clone(), request_id.clone().into(), | ||
| url.clone(), method.clone(), request_headers.clone(), | ||
| connection_url.clone(), method.clone(), request_headers.clone(), |
|
This looks great, with one small change necessary! |
|
|
||
| let cookie = Cookie::new_wrapped( | ||
| cookie_pair, | ||
| &cookie_url, |
There was a problem hiding this comment.
Let's make this HTTP as well, or else it's pretty confusing to read.
Send url that was not modified by the hosts file to the dev tools
Cleanup for readability and correctness of unit test in http_loader
|
@bors-servo: r+ |
|
📌 Commit 248e84e has been approved by |
correctly send secure cookies after hsts url match Fixes #8100, where sites in the hsts list were not recieving secure cookies if the site was originally loading using a plain http url. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9780) <!-- Reviewable:end -->
|
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, status-appveyor |
Fixes #8100, where sites in the hsts list were not recieving secure
cookies if the site was originally loading using a plain http url.