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

Inject scriptlets in about:blank frames #40703

Closed
antonok-edm opened this issue Aug 27, 2024 · 5 comments · Fixed by brave/brave-core#25345
Closed

Inject scriptlets in about:blank frames #40703

antonok-edm opened this issue Aug 27, 2024 · 5 comments · Fixed by brave/brave-core#25345

Comments

@antonok-edm
Copy link
Collaborator

Similar to #40649, scriptlets are not injected and executed in about:blank frames on desktop and Android, but they should be.

@MadhaviSeelam
Copy link

MadhaviSeelam commented Sep 20, 2024

Verification PASSED using

Brave | 1.71.90 Chromium: 129.0.6668.59 (Official Build) beta (64-bit)
-- | --
Revision | 1f5f0d1b8a45a4c60a78c15df081751e39184b97
OS | Windows 11 Version 23H2 (Build 22631.4169)

Reproduced the issue in 1.70.117

image

  1. Installed 1.71.90
  2. launched Brave
  3. opened brave://settings/shields/filters
  4. added below rules to the custom filters box
  • scriptlet.localframes.xyz##+js(set, sval, 1)
  • scriptlet.localframetesting.xyz##+js(set, sval, 42)
  1. clicked Save
  2. opened scriptlet.localframes.xyz in a new tab

Confirmed that the first-party local frames reports a value of 1 instead of undefined, and the third-party local frame reports a value of 42 instead of undefined

step 4 step 6
image image

@MadhaviSeelam
Copy link

Verification PASSED using

Brave | 1.71.91 Chromium: 129.0.6668.59 (Official Build) beta (arm64)
-- | --
Revision | 221dba1a47a2b38858844411284e5bda1de8dd13
OS | macOS Version 14.6.1 (Build 23G93)
  1. Installed 1.71.91
  2. launched Brave
  3. opened brave://settings/shields/filters
  4. added below rules to the custom filters box
  • scriptlet.localframes.xyz##+js(set, sval, 1)
  • scriptlet.localframetesting.xyz##+js(set, sval, 42)
  1. clicked Save
  2. opened scriptlet.localframes.xyz in a new tab

Confirmed that the first-party local frames reports a value of 1 instead of undefined, and the third-party local frame reports a value of 42 instead of undefined

step 4 step 6
Screenshot at Sep 20 13-45-22 Screenshot at Sep 20 13-46-00

@kjozwiak
Copy link
Member

kjozwiak commented Oct 9, 2024

Verification PASSED on Pixel 6 running Android 15 using the following build(s):

Brave | 1.71.110 Chromium: 129.0.6668.100 (Official Build) beta (64-bit)
--- | ---
Revision | 46cd0b1af7127687895fcaceff93dd80e29e6f2b
OS | Android 15; Build/AP41.240823.009; 35; REL
  • added the following rules into via Settings -> Brave Shields & privacy -> Content Filtering -> Create custom filters
scriptlet.localframes.xyz##+js(set, sval, 1)
scriptlet.localframetesting.xyz##+js(set, sval, 42)

Once the above was added into Create custom filters, ensured that:

  • first-party local frames is displaying 1 rather than undefined
  • third-party local frame is displaying 42 rather than undefined
Example Example
Image Image

@kjozwiak
Copy link
Member

kjozwiak commented Oct 9, 2024

Verification PASSED on Samsung Galaxy S8 Ultra running Android 14 using the following build(s):

Brave | 1.71.110 Chromium: 129.0.6668.100 (Official Build) beta (64-bit)
--- | ---
Revision | 46cd0b1af7127687895fcaceff93dd80e29e6f2b
OS | Android 14; Build/UP1A.231005.007; 34; REL
  • added the following rules into via Settings -> Brave Shields & privacy -> Content Filtering -> Create custom filters
scriptlet.localframes.xyz##+js(set, sval, 1)
scriptlet.localframetesting.xyz##+js(set, sval, 42)

Once the above was added into Create custom filters, ensured that:

  • first-party local frames is displaying 1 rather than undefined
  • third-party local frame is displaying 42 rather than undefined
Example Example
Image Image

@LaurenWags LaurenWags added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Oct 14, 2024
@LaurenWags
Copy link
Member

LaurenWags commented Oct 14, 2024

Verified with

Brave | 1.71.112 Chromium: 130.0.6723.44 (Official Build) (64-bit)
-- | --
Revision | 7d51df656b247f9432ee714a6d160142a1e11c13
OS | Linux

Reproduced the issue using 1.70.126.

Then, using 1.71.112,

  1. Installed 1.71.91
  2. launched Brave
  3. opened brave://settings/shields/filters
  4. added below rules to the custom filters box
  • scriptlet.localframes.xyz##+js(set, sval, 1)
  • scriptlet.localframetesting.xyz##+js(set, sval, 42)
  1. clicked Save
  2. opened scriptlet.localframes.xyz in a new tab

Confirmed that the first-party local frames reports a value of 1 instead of undefined, and the third-party local frame reports a value of 42 instead of undefined

1.70.126 1.71.112
Image Image

@LaurenWags LaurenWags added QA Pass-Linux and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment