-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
strictOrigins catches narrower permissions as well as broader #23
Comments
Can you add some failing tests in a PR? This helps see and later fix the issue |
Sure, I've submitted #24 as preparation for the failing tests. |
OK, here's a failing test: It's on top of #24 which is a prerequisite you should be able to safely merge right away. |
You can push it all to the same PR, making the tests fail. I'll use it as a base to fix it (or you can do it) However the premise seems wrong:
This is unrelated to this module, I already explained it, they're overlapping permissions. Granting If the native getAll() reports both, that's a browser bug. |
Done, but my hope was that you would merge the first commit immediately because it should be totally non-controversial and just augmenting the existing test suite with extra cases.
I know, which is why I would not expect
It definitely does report both. Yes it could be argued it's a browser bug, but whether it is or isn't, we still need clarity on how One idea I had was to introduce change |
Good point, done. CI should run automatically on this repo when you open PRs now. I took a look at the failed CI, I see both failing:
So this is not an issue with
Can you provide a repro?
|
Thanks!
Hmm, good point.
I also see no change on this demo. Weird. I'll try testing my extension from the background console in a similar manner. |
OK, this has led to a big break-through in my understanding! At some point during testing, I had moved my default list of allowed sites from Most importantly, it seems that this was the cause of the failure of code to retrieve the tab URL, which in turn caused the toggle menu item to be enabled and unchecked on sites in the manifest when it should have been disabled and checked, which in turn caused broken behaviour when that toggle was clicked. |
I do apologise if this has wasted some of your time as well as mine! To avoid others making the same mistake, would it be worth explicitly documenting in the readmes for https://github.com/fregante/webext-domain-permission-toggle and https://github.com/fregante/webext-dynamic-content-scripts/ that |
Funny you mention that, just yesterday I landed on this: Hey, maybe one day I'll also wrap up my |
The documentation for the
strictOrigins
option says:However, with the way it's implemented, if the manifest contains
https://*.example.com/*
, and the current permissions includeshttps://subdomain.example.com/*
, the latter will be returned as an additional permission even though it's technically narrower than what's in the manifest and not widening the set of permissions in any way.This can occur when subdomains are explicitly added to the set of current permissions via one of Chrome's native UIs for site access (e.g. the second item in the extension's context submenu for site access).
The text was updated successfully, but these errors were encountered: