#11 DOM Inspector breaks when Chrome:// resources are blocked.

Open
opened 7 years ago by B00ze64 · 5 comments
B00ze64 commented 7 years ago

ResourceFilter: Rejected "chrome://inspector/locale/viewer-registry.dtd" moz-nullprincipal:{7683eae4-3d8b-45e7-a3f1-47da49f45956} null XPCWrappedNative_NoHelper { URI: XPCWrappedNative_NoHelper, cspJSON: "{}", jarPrefix: "", originAttributes: Object, origin: "moz-nullprincipal:{7683eae4-3d8b-45…", originNoSuffix: "moz-nullprincipal:{7683eae4-3d8b-45…", originSuffix: "", baseDomain: "{7683eae4-3d8b-45e7-a3f1-47da49f459…", appStatus: 0, appId: 0 }

Which makes DOM Inspector fail completely later with: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIRDFContainerUtils.IndexToOrdinalResource]

There is no way to whitelist the domain, it changes with each instance of Firefox. Is there no way to mark some resources available to all? If we could do this then we could make DOM Inspector work, and also I think we could make the centering of pictures work in tabs...

Thanks.

EDIT: Forgot to mention that disabling No Resource URI is not sufficient, you also have to restart the browser, THEN DOM Inspector will work again...

ResourceFilter: Rejected "chrome://inspector/locale/viewer-registry.dtd" moz-nullprincipal:{7683eae4-3d8b-45e7-a3f1-47da49f45956} null XPCWrappedNative_NoHelper { URI: XPCWrappedNative_NoHelper, cspJSON: "{}", jarPrefix: "", originAttributes: Object, origin: "moz-nullprincipal:{7683eae4-3d8b-45…", originNoSuffix: "moz-nullprincipal:{7683eae4-3d8b-45…", originSuffix: "", baseDomain: "{7683eae4-3d8b-45e7-a3f1-47da49f459…", appStatus: 0, appId: 0 } Which makes DOM Inspector fail completely later with: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIRDFContainerUtils.IndexToOrdinalResource] There is no way to whitelist the domain, it changes with each instance of Firefox. Is there no way to mark some resources available to all? If we could do this then we could make DOM Inspector work, and also I think we could make the centering of pictures work in tabs... Thanks. EDIT: Forgot to mention that disabling No Resource URI is not sufficient, you also have to restart the browser, THEN DOM Inspector will work again...
platform commented 7 years ago
Owner

Try whitelisting "inspector" but this will expose all files for the inspector to any web sites (revealing OS, build configuration, etc.)

Try whitelisting "inspector" but this will expose all files for the inspector to any web sites (revealing OS, build configuration, etc.)
B00ze64 commented 7 years ago
Poster

Good day Neuemars,

Ok that works. I was confused about the meaning of DOMAIN. Why do you say it would expose OS, Build, etc - All it exposes are DOM Inspector files, which should be the same everywhere anyway. I also had to whitelist "flashstopper" or videos would not play (PS: This is Case-Sensitive too). If we want the centering of images to work we have to whitelist global and gre, but that is too much. Ideally we should be able to whitelist specific resources; can this be added? If we could whitelist "resource://gre/res/ImageDocument.css", "resource://gre/res/TopLevelImageDocument.css" and "chrome://global/skin/media/TopLevelImageDocument.css" then centering of images will work, and those CSS files are probably the same since version 4 of Firefox anyway...

Thanks. Best Regards,

Good day Neuemars, Ok that works. I was confused about the meaning of DOMAIN. Why do you say it would expose OS, Build, etc - All it exposes are DOM Inspector files, which should be the same everywhere anyway. I also had to whitelist "flashstopper" or videos would not play (PS: This is Case-Sensitive too). If we want the centering of images to work we have to whitelist global and gre, but that is too much. Ideally we should be able to whitelist specific resources; can this be added? If we could whitelist "resource://gre/res/ImageDocument.css", "resource://gre/res/TopLevelImageDocument.css" and "chrome://global/skin/media/TopLevelImageDocument.css" then centering of images will work, and those CSS files are probably the same since version 4 of Firefox anyway... Thanks. Best Regards,
B00ze64 commented 7 years ago
Poster

Just noticed someone (7w2) posted a Stylish that applies the 3 CSS files for centering of images to well, images. I will thank him here; I don't like Discourse. I still think we should be able to expose specific resources, not just whole domains...

Just noticed someone (7w2) posted a Stylish that applies the 3 CSS files for centering of images to well, images. I will thank him here; I don't like Discourse. I still think we should be able to expose specific resources, not just whole domains...
platform commented 7 years ago
Owner

Yes, it should be easy, making use of regex filter lists. I'd like to know how traditional blocker extensions handle such rules. (Especially UI and configuration part) BTW, I'd accept pull requests here if needed.

Yes, it should be easy, making use of regex filter lists. I'd like to know how traditional blocker extensions handle such rules. (Especially UI and configuration part) BTW, I'd accept pull requests here if needed.
B00ze64 commented 7 years ago
Poster

They all do it differently. uBlock uses a browser tab for its preferences; the whitelist is a tab inside the browser tab with a HUGE textbox where you enter 1 domain per line. RAS has a small textblock and you have to enter all the sites in the JSON format which is a real pain. Cavas Blocker is the same as no-resource-uri-leak, there is a single-line-high textbox to enter websites separated with commas.

I did my first pull request today on Git but all I did was change some things in the XUL files for an addOn. I am afraid that adding regexp filter processing to No-Resource-URI-Leak is beyond my ability at the moment :-( I could probably change it so that the whitelist is ONLY full URIs instead of domains, but that's as far as I could go for now.

Thanks for a really good addOn btw!

They all do it differently. uBlock uses a browser tab for its preferences; the whitelist is a tab inside the browser tab with a HUGE textbox where you enter 1 domain per line. RAS has a small textblock and you have to enter all the sites in the JSON format which is a real pain. Cavas Blocker is the same as no-resource-uri-leak, there is a single-line-high textbox to enter websites separated with commas. I did my first pull request today on Git but all I did was change some things in the XUL files for an addOn. I am afraid that adding regexp filter processing to No-Resource-URI-Leak is beyond my ability at the moment :-( I could probably change it so that the whitelist is ONLY full URIs instead of domains, but that's as far as I could go for now. Thanks for a really good addOn btw!
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.