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

Add support for $csp filter rules #14792

Closed
antonok-edm opened this issue Mar 17, 2021 · 4 comments · Fixed by brave/brave-core#8281
Closed

Add support for $csp filter rules #14792

antonok-edm opened this issue Mar 17, 2021 · 4 comments · Fixed by brave/brave-core#8281

Comments

@antonok-edm
Copy link
Collaborator

antonok-edm commented Mar 17, 2021

Easylist contains some rules with $csp options. These are useful as a last-resort when other more fine-grained blocking approaches are insufficient, and are implemented by modifying the Content-Security-Policy response headers from a document or subdocument request.

More details about the semantics of these options can be found on the uBlock Origin wiki and the AdGuard knowledgebase:

@antonok-edm antonok-edm added enhancement feature/shields/adblock Blocking ads & trackers with Shields OS/Android Fixes related to Android browser functionality OS/Desktop labels Mar 17, 2021
@antonok-edm antonok-edm self-assigned this Mar 17, 2021
@antonok-edm antonok-edm changed the title Support $csp filter rules Add support for $csp filter rules Mar 18, 2021
@antonok-edm antonok-edm added the privacy-pod Feature work for the Privacy & Web Compatibility pod label Mar 24, 2021
@antonok-edm antonok-edm added this to the 1.25.x - Nightly milestone Apr 14, 2021
@btlechowski btlechowski added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Apr 15, 2021
@btlechowski
Copy link

btlechowski commented Apr 15, 2021

Verification passed on

Brave 1.25.18 Chromium: 90.0.4430.72 (Official Build) nightly (64-bit)
Revision b6172ef8d07ef486489a4b11b66b2eaeed50d132-refs/branch-heads/4430@{#1233}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#8281
Verified the scripts were blocked:

Refused to load the script '<URL>' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' <URL> *.hcaptcha.com". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

image


Verified passed with

Brave | 1.25.60 Chromium: 90.0.4430.212&nbsp;(Official Build)&nbsp;beta&nbsp;(x86_64)
-- | --
Revision | e3cd97fc771b893b7fd1879196d1215b622c2bed-refs/branch-heads/4430@{#1429}
OS | macOS Version 10.15.7 (Build 19H1030)

Verified test plan from brave/brave-core#8281 (comment).

14792


Verification passed on


Brave | 1.25.60 Chromium: 90.0.4430.212&nbsp;(Official Build)&nbsp;beta&nbsp;(64-bit)
-- | --
Revision | e3cd97fc771b893b7fd1879196d1215b622c2bed-refs/branch-heads/4430@{#1429}
OS | Windows&nbsp;10 OS Version 2004 (Build 19041.985)


@btlechowski btlechowski added QA Pass-Linux and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Apr 15, 2021
@stephendonner
Copy link

@btlechowski is that the correct user-agent (1.23.71), as this is in the 1.25.x milestone?

@btlechowski
Copy link

Right, silly mistake. Fixed.

@srirambv
Copy link
Contributor

Verification passed on the following devices running 1.25.51 x64 Beta build

OnePlus (Android 10) Samsung Tab A (Android 10)

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

Successfully merging a pull request may close this issue.

6 participants