-
Notifications
You must be signed in to change notification settings - Fork 84
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
Logger incorrectly reporting header=
filters
#1932
Comments
Related issue: - uBlockOrigin/uBlock-issues#1932 Related commit: - 725e693
Thanks for reporting. Regression from refactoring work in 1.40.0. |
Point 3:
|
This is not specific to
This happens because the For now I will improve the parser to have it better guess that |
Related issue: - uBlockOrigin/uBlock-issues#1932 Reported in point 3 under "Actual behavior".
More regarding point 1 (and by extension, point 2):
So it would seem like only websites served through HTTP <= 1.x are affected by point 1. Maybe this in itself is a useful narrowing option (e.g. targeted scripts were only served |
Also completed fix for reverse lookup issues related to `header=` filter option: uBlockOrigin/uBlock-issues#1932
I can't reproduce this with latest dev build, probably fixed at some point while improving static filtering parser. |
Fixed in last commit linked gorhill/uBlock@aa6baf9 |
Prerequisites
I tried to reproduce the issue when...
Description
I understand this is still experimental but after upgrading to 1.40.8, filters with a
header=
option is incorrectly reported asheader=[object Object]
(literally) in the uBO logger. I also do not see any warning not to open issues about this in the Static filter syntax wiki page.A specific URL where the issue occurs
Everywhere but
https://news.ycombinator.com/
may be a good example.Steps to Reproduce
*$script,header={header_name}:{header_value}
to My filters.Expected behavior
Logger correctly reports the filter as
*$script,header={header_name}:{header_value}
and originating from My filters. This worked as expected in 1.39.2.Actual behavior
Logger reports the filter as
*$script,header=[object Object]
and returns Static filter could not be found in any of the currently enabled filter lists.Some other
header=
-related quirks that I noticed but don't know if you want them filed:$header=header_name
will only matchheader_name
but notHeader_Name
. This is problematic because some sites (e.g.https://news.ycombinator.com
) capitalize the first letter of each word in their headers.header_value
field but notheader_name
orheader_name:header_value
. My current workaround is to add two filters, one capitalized and one non-capitalized./^regex$/$script,header=header_name:/^header_value$/,_
.header=
filter option is still experimental, but should this ever move to stable status, it would be nice to have some sort of indication (a different shade/color?) in the uBO logger that only the response is blocked. Currently it looks like (understandably) that a network request is not blocked and then very quickly blocked in the logger.I can provide a potential use case if you need one to proceed.
uBlock Origin version
1.40.8
Browser name and version
Firefox 96.0.1
Operating System and version
N/A
The text was updated successfully, but these errors were encountered: