lapcat / SafariExtensions

Resources for the development of Safari extensions
43 stars 3 forks source link

FB12201625 - Safari extension permissions data loss #37

Open lapcat opened 1 year ago

lapcat commented 1 year ago

I'm testing with my extension StopTheScript https://apps.apple.com/app/stopthescript/id1588394487?mt=8 but any extension should work.

Steps to reproduce:

  1. In the extension's settings, set All Websites to Ask
  2. In Safari, open apple.com
  3. In Safari's address bar menu, select the extension, and Always Allow on This Website
  4. In the extension's settings, switch apple.com from Allow to Deny
  5. In the extension's settings, switch Other Websites from Ask to Allow
  6. In Safari, reload the web page
  7. In the extension's settings, switch Other Websites from Allow to Ask
  8. In Safari, open webkit.org
  9. In Safari's address bar menu, select the extension, and Always Allow on This Website

Expected Results: apple.com Deny, webkit.org Allow

Actual Results: The apple.com Deny entry is erased, leaving only webkit.org Allow

The bug prevents certain advanced usage of my extension. I'm honestly not sure whether this bug always existed or was introduced after I wrote this: https://underpassapp.com/StopTheScript/advanced.html