mbnuqw / sidebery

Firefox extension for managing tabs and bookmarks in sidebar.
MIT License
3.26k stars 163 forks source link

Container URL rules don't work if you haven't granted Proxy permission #498

Open pintassilgo opened 2 years ago

pintassilgo commented 2 years ago

Steps to reproduce

  1. Install current Sidebery (4.9.4) in a new Firefox profile.
  2. Try to add an URL rule to a container, Sidebery will ask for "Access browser tabs" permission; grant it.
  3. Add an URL rule to a container, like example.com to Personal.
  4. Open example.com.

Expected behavior

example.com should open in Personal container.

Actual behavior

example.com opens in current container (default).


Tried with 4.9.3, same result. Installed 4.9.2 and then example.com opens in Personal. Then installed 4.9.3 again, working. Installed current 4.9.4, now it works too.

So the bug is that URL rules don't work if you are a new Sidebery user that didn't use 4.9.2 (or lesser, probably). Older Sidebery users won't be able to reproduce this issue.

pintassilgo commented 2 years ago

Up to 4.9.2, proxy permission was mandatory. Starting from 4.9.3, it's optional and default off for new users, but if you upgraded from older versions proxy remains granted.

Current code structure needs proxy to be enabled for URL rules to work. It shouldn't be that way, there's no dependency. And Sidebery don't ask for proxy permission when you enable URL rules.

pintassilgo commented 2 years ago

If I undestand correctly, Sidebery is using browser.proxy.onRequest to handle container URL rules, but browser.webRequest.onBeforeRequest should be used instead.