We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I think this case: https://github.com/brave/brave-core/pull/942/files#diff-88c7c5c4d9e052b70374fe67c125d985R39
Happens when there's an iframe and inside that iframe there's a 302 redirect that happens.
There's a bug we had before brave/brave-core#942 landed where if you load this URL: https://www.reddit.com/r/videos/comments/a2t52m/nickelodeon_just_uploaded_a_high_quality_version/
It would 302 a call to doubleclick.net and which would lead to 200 success codes for URLs which should be blocked: https://static.doubleclick.net/instream/ad_status.js https://googleads.g.doubleclick.net/pagead/id?slf_rd=1
This issue is posted to add an ad-block test that will cover this case. Revert the PR mentioned to reproduce the issue.
The text was updated successfully, but these errors were encountered:
Doing this will reproduce:
diff --git a/browser/net/url_context.cc b/browser/net/url_context.cc index 38f9a692..79e5d790 100644 --- a/browser/net/url_context.cc +++ b/browser/net/url_context.cc @@ -33,8 +33,9 @@ void BraveRequestInfo::FillCTXFromRequest(const net::URLRequest* request, &ctx->render_frame_id, &ctx->render_process_id, &ctx->frame_tree_node_id); - if (!request->site_for_cookies().is_empty()) { + //if (!request->site_for_cookies().is_empty()) { ctx->tab_url = request->site_for_cookies(); + /* } else { // We can not always use site_for_cookies since it can be empty in certain // cases. See the comments in url_request.h @@ -43,6 +44,7 @@ void BraveRequestInfo::FillCTXFromRequest(const net::URLRequest* request, ctx->render_frame_id, ctx->frame_tree_node_id).GetOrigin(); } + */ ctx->tab_origin = ctx->tab_url.GetOrigin(); ctx->allow_brave_shields = brave_shields::IsAllowContentSettingFromIO( request, ctx->tab_origin, ctx->tab_origin, CONTENT_SETTINGS_TYPE_PLUGINS,
Sorry, something went wrong.
Test should fail with above patch applied and pass when it isn't applied pls.
Test can go in this file with other adblock tests: components/brave_shields/browser/ad_block_service_browsertest.cc
components/brave_shields/browser/ad_block_service_browsertest.cc
cc @iefremov Turns out only an iframe needed to do an XHR to reproduce it having a blank site_for_cookies.
iefremov
Successfully merging a pull request may close this issue.
I think this case:
https://github.com/brave/brave-core/pull/942/files#diff-88c7c5c4d9e052b70374fe67c125d985R39
Happens when there's an iframe and inside that iframe there's a 302 redirect that happens.
There's a bug we had before brave/brave-core#942 landed where if you load this URL:
https://www.reddit.com/r/videos/comments/a2t52m/nickelodeon_just_uploaded_a_high_quality_version/
It would 302 a call to doubleclick.net and which would lead to 200 success codes for URLs which should be blocked:
https://static.doubleclick.net/instream/ad_status.js
https://googleads.g.doubleclick.net/pagead/id?slf_rd=1
This issue is posted to add an ad-block test that will cover this case.
Revert the PR mentioned to reproduce the issue.
The text was updated successfully, but these errors were encountered: