fregante / webext-permissions

WebExtensions module: Get any optional permissions that users have granted you.
MIT License
15 stars 1 forks source link

Safari support: every host permission is reported as "additional" #1

Closed fregante closed 3 years ago

fregante commented 4 years ago

This appears to be the case from initial trials. Further testing needed.

fregante commented 3 years ago

Figured it out: Safari’s permissions are stored as *://*.github.com/*, which might not be a direct match with what's in the permissions key

fregante commented 3 years ago

Technically the current situation is correct. *://*.github.com/* is different from *://github.com/* so it is, in fact, an "additional" permission.

The correct solution is to change the manifest.json permission to what Safari gives access to, but I'm afraid that it will trigger a warning in Chrome.

Testing needed

Edit: testing is hard, but I'm confident that prepending *. to the host is a substantial change.

fregante commented 3 years ago

I’ll implement loose host matching with an option, so only the domain is considered when comparing permissions and nothing else.

fregante commented 3 years ago

Also to track for Safari support: