Skip to content
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

Wrong referrer policy used in cors_preflight_request #13026

Closed
jdm opened this issue Aug 24, 2016 · 4 comments
Closed

Wrong referrer policy used in cors_preflight_request #13026

jdm opened this issue Aug 24, 2016 · 4 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Aug 24, 2016

The specification for step 1 says we should use request's referrer policy. There's an obvious copy/paste typo that uses the default request policy for the new preflight variable instead.

Code: components/net/fetch/methods.rs
Test: modify test_cors_preflight_fetch in tests/unit/net/fetch.rs by setting the original referrer policy used to origin and setting a URL referrer a path (a.html), and checking that the referrer header that the server receives does not contain the path. Run the test with ./mach test-unit -p net.

@jdm jdm added this to the Taiwan Code Sprint milestone Aug 24, 2016
@wdv4758h
Copy link
Contributor

@wdv4758h wdv4758h commented Aug 27, 2016

I'll take this 😄

@jdm
Copy link
Member Author

@jdm jdm commented Aug 27, 2016

Go for it! Ask questions if anything is unclear!

@shinglyu
Copy link
Member

@shinglyu shinglyu commented Aug 27, 2016

@jdm: So by setting the policy as origin, a Referrer URL foo.com/a.html will become foo.com in the header, right?

@jdm
Copy link
Member Author

@jdm jdm commented Aug 27, 2016

@shinglyu: Exactly.

bors-servo added a commit that referenced this issue Aug 27, 2016
Solved wrong referrer policy in cors_preflight_fetch

Solved wrong referrer policy in cors_preflight_fetch

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13026
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13071)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Aug 27, 2016
Solved wrong referrer policy in cors_preflight_fetch

Solved wrong referrer policy in cors_preflight_fetch

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13026
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13071)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.