LowTechFilter icon indicating copy to clipboard operation
LowTechFilter copied to clipboard

[removeparam] [uBO] ๐Ÿš€ request to update filter (google.com)

Open ghost opened this issue 3 years ago โ€ข 6 comments

what does FutaFilter do currently?

https://github.com/FutaGuard/FutaFilter/blob/26bf4163819aea77e9d54a820d689e1075764951/removeparam.txt#L41 $removeparam=/utm_campaign/i

filter may remove too many characters from few Google URL-s path.

supposed to be

N/A, exclude clear google links may reduce the effectiveness of the list.

reason

steps to reproduce:

  1. Sometime on Google Maps is promoted now opened local shops (with daily needed food) or restaurants

  2. In this small pop-up we have found these links:

     https://www.google.com/url?q=https://www.google.com/maps/search/otwarty%2Bsklep%2Bspo%C5%BCywczy%3Futm_source%3Dgoogle%26utm_medium%3Dhppromo%26utm_campaign%3Dretail_m&source=hpp
    
  3. Then $removeparam=/utm_campaign/i remove main of paramert q=:

    q=https://www.google.com/maps/search/otwarty%2Bsklep%2Bspo%C5%BCywczy%3Futm_source%3Dgoogle%26utm_medium%3Dhppromo%26utm_campaign%3Dretail_m
    
  4. so we have error about "this url redirect to invalid page".

ghost avatar Apr 13 '21 08:04 ghost

I can't reproduce with AdGuard.

Step:

  1. Open https://www.google.com/url?q=https://www.google.com/maps/search/otwarty%2Bsklep%2Bspo%C5%BCywczy%3Futm_source%3Dgoogle%26utm_medium%3Dhppromo%26utm_campaign%3Dretail_m&source=hpp
  2. AdGuard do remove parameter image image image
  3. Finally redirect to https://www.google.com/maps/search/otwarty+sklep+spo%C5%BCywczy

tasi788 avatar Apr 16 '21 11:04 tasi788

@gorhill

ghost avatar Apr 16 '21 12:04 ghost

The filter is not crafted properly. When using regex-based removeparam token, more attention needs to be paid to the regex so as to avoid false positive. The filter should really be:

*$removeparam=/^utm_campaign=/i

This will avoid false positives.


Ideally there is no need to a regex, this will work just as well:

*$removeparam=utm_campaign

gorhill avatar Apr 16 '21 12:04 gorhill

Thanks @gorhill for the suggestion โ˜บ๏ธ however FutaFilter list was built for AdGuard at first, so I was not clear about uBO's syntax. But I will try to make it compatible with other adblocker next time ๐Ÿ‘Œ

tasi788 avatar Apr 17 '21 05:04 tasi788

AdGuard will also support the same syntax/semantic, this was the result of discussions to implement removeparam the same way in both blockers, see https://github.com/uBlockOrigin/uBlock-issues/issues/1356#issuecomment-735896202.

gorhill avatar Apr 17 '21 11:04 gorhill

For uBo 1.36.0+ only:

@@||www.google.*/url?q=https://www.google.*/maps/*utm_campaign$removeparam

See these: https://github.com/uBlockOrigin/uBlock-issues/issues/1626

ghost avatar Jul 01 '21 23:07 ghost