Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> chrome-extension://<extension_id>/<file>

These are web accessible resources, e.g. images and stylesheets you can reference in generated HTML. Since content scripts operate directly on the same DOM, it’s unclear how you can tell an <img> or <link> came from the modification of a content script or a first party script. You might argue it’s possible to block these in fetch(), but then you also need to consider leaks in say Image’s load event.

This behavior has been improved in MV3, with option to make the extension id dynamic to defeat detection:

> Note: In Chrome in Manifest V2, an extension's ID is fixed. When a resource is listed in web_accessible_resources, it is accessible as chrome-extension://<your-extension-id>/<path/to/resource>. In Manifest V3, Chrome can use a dynamic URL by setting use_dynamic_url to true.

This should really be the default though.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...

 help



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: