-
Notifications
You must be signed in to change notification settings - Fork 885
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
Fix referrer protections for frame redirects. #6674
Conversation
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 assume you've tested these changes using https://referrer.fmarier.org/redirects.html?
components/content_settings/renderer/brave_content_settings_agent_impl_browsertest.cc
Outdated
Show resolved
Hide resolved
components/content_settings/renderer/brave_content_settings_agent_impl_browsertest.cc
Outdated
Show resolved
Hide resolved
components/content_settings/renderer/brave_content_settings_agent_impl_browsertest.cc
Show resolved
Hide resolved
components/content_settings/renderer/brave_content_settings_agent_impl_browsertest.cc
Show resolved
Hide resolved
71ec0ed
to
b149a22
Compare
sure thing |
method_ = redirect_info.new_method; | ||
referrer_ = redirect_info.new_referrer; | ||
referrer_policy_ = redirect_info.new_referrer_policy; | ||
+ BRAVE_REDIRECT_CLEARREFERRER |
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.
@bridiver There is no way to update referrer in URLRequest (which actually sends this header to the network) via existing URLLoader
/URLLoaderClient
APIs , so I had to patch. An alternative was to use "extra" headers in BraveProxyingURLLoaderFactory
, but earlier we decided to ban this approach due to potential negative performance implications.
91a5ef2
to
25ebe29
Compare
48832ce
to
f1a6da6
Compare
original_method, | ||
redirect_info, | ||
removed_headers, | ||
modified_headers, | ||
request_headers, | ||
should_clear_upload); |
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.
Formatting looks a bit odd here.
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.
patches/chromium_src look ok
1d2cee1
to
49cd189
Compare
49cd189
to
48c0a6f
Compare
Fix https://github.com/brave/internal/issues/679
Fix brave/brave-browser#7933
Resolves
Submitter Checklist:
npm run lint
,npm run gn_check
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.