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

allow Shields to block urls with invalid origins #3210

Merged
merged 3 commits into from
Aug 20, 2019
Merged

allow Shields to block urls with invalid origins #3210

merged 3 commits into from
Aug 20, 2019

Conversation

cezaraugusto
Copy link
Contributor

@cezaraugusto cezaraugusto commented Aug 20, 2019

fix brave/brave-browser#5346
fix brave/brave-browser#5483

shields can't manually block urls with invalid origins, making blob:// and data:// scripts impossible to allow once, for example.

Test Plan

See brave/brave-browser#5346 and brave/brave-browser#5483.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

cezaraugusto and others added 2 commits August 19, 2019 21:36
fix brave/brave-browser#5346
fix brave/brave-browser#5483

shields can't manually block urls with invalid origins, making
blob:// and data:// scripts impossible to allow once, for example.
this channge ensures that Shields see such scripts the same way as
scripts with valid origins.
@bsclifton
Copy link
Member

bsclifton commented Aug 20, 2019

Manual tests work great - changes look good. I'm getting two browser test failures though:

    BraveContentSettingsObserverBrowserTest.AllowScripts (../../brave/renderer/brave_content_settings_observer_browsertest.cc:687)
    BraveContentSettingsObserverBrowserTest.BlockScriptsShieldsDown (../../brave/renderer/brave_content_settings_observer_browsertest.cc:696)

Both fail every time; I'm running with:
npm run test brave_browser_tests -- Release --filter=BraveContentSettingsObserverBrowserTest.*

@yrliou
Copy link
Member

yrliou commented Aug 20, 2019

ah forgot to update them, will upload a fix momentary.

Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran through manual test plan. Also verified all tests pass locally. Changes look good!

Let's wait for CI before merging, but I think we can uplift this change back to 0.69.x 😄

Great teamwork! 💯

@yrliou yrliou merged commit 565fb27 into master Aug 20, 2019
@yrliou yrliou deleted the ca-5346 branch August 20, 2019 07:44
@yrliou
Copy link
Member

yrliou commented Aug 20, 2019

CI is green, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants