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

adblocker: the library should respect the scriptlet alias in the exception filter #4058

Open
seia-soto opened this issue Jul 1, 2024 · 0 comments

Comments

@seia-soto
Copy link
Member

Problem

While fixing newser.com (from ghostery/broken-page-reports#720), we identified the scriptlet exceptions were not working.

The list has the following filters:

newser.com##+js(abort-on-stack-trace, Math, onerror)
newser.com##+js(addEventListener-defuser, load, Object)

and the following snippet was used to make exceptions work on Ghostery Browser Extension version 8:

COMMON.modules.adblocker.background.adblocker.manager.engine.updateFromDiff({ added: ['newser.com#@#+js(abort-on-stack-trace, Math, onerror)', 'newser.com#@#+js(addEventListener-defuser, load, Object)'] })

Later, the scriptlet exception never been worked was found by @chrmod. The suggested solution looks like the following:

newser.com#@#+js(aost, Math, onerror)
newser.com#@#+js(aeld, load, Object)

Expected behavior

The adblocker library should respect the scriptlet alias in the exception filter. Thus, the both exception filters should do their jobs.

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

Successfully merging a pull request may close this issue.

1 participant