uBlockOrigin/uBlock-issues

Prevent cookie lists from being selected at the same time

thataccount opened this issue · 9 comments

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

AdGuard/uBO – Cookie Notices and EasyList/uBO – Cookie Notices have filters that reload webpages after changing cookie values.

If they're programmed to set cookies to different values, this may cause an infinite refresh loop.

Consider adding a check to prevent them from being selected at the same time. This would prevent conflicts without having to remove either list from the extension.

If a user has selected EasyList/uBO – Cookie Notices, and then click on AdGuard/uBO – Cookie Notices , the extension will deselect EasyList/uBO – Cookie Notices, and vice-versa.

A specific URL where the issue occurs.

See https://github.com/uBlockOrigin/uAssets/issues/23562

Steps to Reproduce

Expected behavior

Actual behavior

uBO version

1.57.2

Browser name and version

Firefox 125.0.3

Operating System and version

Hannah Montana Linux

This kind of breakage can occur with any list that uses set-cookie/set-cookie-reload. Making people choose either AdGuard or EasyList Cookie Notices wouldn't solve the issue beyond this particular case, and would get in the way of people with legitimate reasons to use both lists (they don't cover all the same sites).

I wonder if uBO should discard a second filter trying to set the same cookie just as if it were an exact duplicate.

There were actually other issues prior to the above case with 2 cookie lists conflicted to each other. I agree with the solution of only choosing 1 list for cookie. Other lists can use set-cookie but these 2 setlists are the ones using it the most extensively and can highly likely cause conflictions, especially when this is the only scriptlet with a reload option which can cause more severe issue than other filters.

We don't encourage users to enable more lists to cover different sites any way, and all of the breakages will just be reported to uBO volunteers to solve. Breakage is always a more important issue than lack of sites' coverages. Reporting to respective list maintainers is the correct way to solve the latter.

Agreed. In this particular case, though, the user had a custom AG Annoyance added to his lists (instead of enabled AG Cookie Notices itself), so the issue would've still arisen.

Yes, I think we can just try to cover the most obvious/popular case here since it's impossible to cover all edge cases (even the same list can have same issue if there are some mistakes)

Consider adding a check to prevent them from being selected at the same time. This would prevent conflicts without having to remove either list from the extension.

This would make it difficult to diagnose filter issues since whichever one takes effect first is undetermined.

The most conflicts are between EasyList cookies and AdGuard cookies, but on the other hand the both lists are reasonably unique and are good supplements to each other, hence forcing to "enable only one cookie list at once" will significantly reduce the effectiveness of blocking cookie notices, the optimal solution would be to fix conflicts at set-cookie scriptlet level if possible.

In the past set-constant was similar breakage: #156 (comment)

This would make it difficult to diagnose filter issues since whichever one takes effect first is undetermined.

My proposal is to make it possible to select only one of them in the GUI.

By "without having to remove either list from the extension", I meant "without having to remove them from the list of available lists" (in the other issue, someone hinted that you should remove the AdGuard list from uBlock Origin altogether).