redirect filters
chrome Version 62.0.3202.38 (Official Build) beta (64-bit)
uBo 1.14.11.110
default setup, disabling ublock filters
tests on phonearena.com
these 4 filters don't work (the filter is showed in logger but without the redirect=nooptext keyword)
.info/http$xmlhttprequest,redirect=nooptext,domain=phonearena.com
|htpps://*.info/http$xmlhttprequest,redirect=nooptext,domain=phonearena.com
/http$xmlhttprequest,redirect=nooptext,domain=phonearena.com
|https://mxq9cw.gff6166tdt2i4fc155zi11.info/http$xmlhttprequest,redirect=nooptext,domain=phonearena.com
only this filter is working fine (the info server can vary ...)
||mxq9cw.gff6166tdt2i4fc155zi11.info/http$xmlhttprequest,redirect=nooptext,domain=phonearena.com
Is this an expected behaviour ?
Is this an expected behaviour ?
Yes, by design. The filter must be anchored to a hostname (using ||) without wildcard, or alternatively a single wildcard if the filter must apply to any destination. So this means these should work:
||info/http$xmlhttprequest,redirect=nooptext,domain=phonearena.com
Or, though less ideal because broader:
*/http$xmlhttprequest,redirect=nooptext,domain=phonearena.com
These restrictions are to ensure an efficient processing, this allows to store the redirection information efficiently internally. For example, the second form is used in:
*/fuckadblock-$script,redirect=fuckadblock.js-3.2.0
I see. However at least this 1 should be equivalent to || case:
|https://mxq9cw.gff6166tdt2i4fc155zi11.info/http$xmlhttprequest,redirect=nooptext,domain=phonearena.com
However at least this 1 should be equivalent to || case:
Yes, since uBO can extract a wildcard-less hostname from that filter, it should accept it.
The second filter in that list of four is misspelled: htpps should be https.
Anyway... xmlhttprequest redirect Not working on Firefox
After reconsideration, I rather stick to the current restrictions, they are not crippling and can take care of the filter issue here. Relaxing the restrictions will just lead to more false expectations regarding what is allowed. So in short, the filter must be of the form:
||[valid hostname label]^...$[type],redirect=[token],...
||[valid hostname label]/...$[type],redirect=[token],...
*/...$[type],redirect=[token],...
I added minimal documentation for this.