-
Notifications
You must be signed in to change notification settings - Fork 889
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
Strip xorigin navigation referrers instead of spoofing #2070
Conversation
|
||
// Same-origin navigations get full referrers. | ||
const GURL kSameOriginRequest("http://document.com/different/path"); | ||
referrer = kReferrer; |
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.
That's the fix for the test failure.
|
||
// Special rule for extensions. | ||
const GURL kExtensionUrl("chrome-extension://abc/path?query"); | ||
referrer = kReferrer; |
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.
That will ensure that this test doesn't start failing for obscure reasons in the future if we add another test before it.
Fixes brave/brave-browser#3422. This is based on the #2070 pull request which was committed in 501f4e0 and then reverted in 056ce15 because of brave/brave-browser#3988.
Fixes brave/brave-browser#3422. This is based on the #2070 pull request which was committed in 501f4e0 and then reverted in 056ce15 because of brave/brave-browser#3988.
Fixes brave/brave-browser#3422. This is based on the #2070 pull request which was committed in 501f4e0 and then reverted in 056ce15 because of brave/brave-browser#3988.
Fixes brave/brave-browser#3422.
This is the same as #1767, which was reverted in #2049, but with a small fix to the failing test.
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests && npm run test-security
) onnpm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
This can be manually tested using https://fmarier.github.io/brave-testing/referrer-spoofing.html.
Reviewer Checklist: