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

Modify redirect semantics in preparation for redirect-rule support #186

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

antonok-edm
Copy link
Collaborator

Second implementation step of this plan.

When updated DATs are available, begin treating redirects as independent from blocking/exception filters. This means exceptions for blocking should only be looked for in Blocker::exceptions, and exceptions for redirections should only be looked for in Blocker::redirects. Blocker::redirects should be checked for all matches rather than the first match (similar to $csp), and results should be combined accordingly. At this point, a redirection exception should always occur whenever a blocking exception occurs, but the code should be ready to handle the case when they do not occur together.

This will require a minor version bump. Even though there are no breaking interface changes, it is changing the semantics of how BlockerResult::matched and BlockerResult::redirect interact; downstream code will have to be updated accordingly.

@antonok-edm antonok-edm self-assigned this Sep 15, 2021
@antonok-edm antonok-edm merged commit c8fb7c5 into master Sep 17, 2021
@antonok-edm antonok-edm deleted the redirect-rule-pt2 branch September 17, 2021 00:56
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 this pull request may close these issues.

1 participant