brave / brave/adblock-rust

$redirect-rules used with $Important act as $redirect

Open
#231 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.8k
Forks
250
Avg merge
1d 16h
Merged PRs (30d)
6

Description

As the title say, there is a problem with the $redirect-rules acting as simple $redirect when paired with the $important filter.

example: `*$script,redirect-rule=noopjs,domain=brave.com,important` every script will get the noopjs, just like if you used the _simple_ $redirect filter.

If you remove the $important from the filter, then only matomo.js gets the noopjs.

It works fine in uBlock and while it is not something critical or something everyone will use, it is still a misbehavior by Brave's adblocker not to respect the $redirect-rule filter and how it only should apply redirection to blocked elements.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the reported behavior with `*$script,redirect-rule=noopjs,domain=brave.com,important` and compare it with the same filter without `important`. Check that the rule only redirects blocked elements and does not behave like the simple `$redirect` filter; the issue is done when the Brave adblocker matches the stated redirect-rule semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.