[Pkg-mozext-commits] [requestpolicy] 44/50: [ref] generalize "chrome://*/skin" Add-on compatibility
David Prévot
taffit at moszumanska.debian.org
Mon Jun 27 12:50:34 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit 4d182afeb2b35eb2404f196fb6808e8534965a2c
Author: Martin Kimmerle <dev at 256k.de>
Date: Sun Jun 26 12:51:43 2016 +0200
[ref] generalize "chrome://*/skin" Add-on compatibility
---
ChangeLog.md | 10 +++++-----
src/content/lib/request-processor.compat.js | 12 ------------
src/content/lib/request.jsm | 14 +++++++++++++-
tests/content/internal-destinations_1.html | 14 ++++++++++++++
4 files changed, 32 insertions(+), 18 deletions(-)
diff --git a/ChangeLog.md b/ChangeLog.md
index 0694fd1..3eaeead 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -5,14 +5,14 @@ Note: ChangeLogs for the source code and unit tests, both not relevant for
#### Version 1.0.beta12.2
* bugfixes
- * "about:blank" is now defined as an "internal" request and thus
- whitelisted (#784).
- * Add-on compatibility: rikaichan (#784)
- * Add-on compatibility: Grab and Drag
+ * some destination URIs are now recognized to be "internal" and thus
+ whitelisted (#784)
+ * "about:blank" -- necessary for some websites
+ * "chrome://*/skin/" -- necessary for some Add-ons
#### Version 1.0.beta12.1
* bugfixes
- * The menu overlay of some Add-Ons did not work; it stayed blank.
+ * The menu overlay of some Add-ons did not work; it stayed blank.
#### Version 1.0.beta12.0
* improvements
diff --git a/src/content/lib/request-processor.compat.js b/src/content/lib/request-processor.compat.js
index 09bb4a3..19696b2 100644
--- a/src/content/lib/request-processor.compat.js
+++ b/src/content/lib/request-processor.compat.js
@@ -204,18 +204,6 @@ RequestProcessor = (function(self) {
]);
break;
- case "{0AA9101C-D3C1-4129-A9B7-D778C6A17F82}": // rikaichan
- Logger.info(Logger.TYPE_INTERNAL,
- "Using extension compatibility rules for: " + ext.name);
- compatibilityRules.push([null, "chrome://rikaichan/skin/", ext.name]);
- break;
-
- case "{477c4c36-24eb-11da-94d4-00e08161165f}": // Grab and Drag
- Logger.info(Logger.TYPE_INTERNAL,
- "Using extension compatibility rules for: " + ext.name);
- compatibilityRules.push([null, "chrome://grabanddrag/skin/", ext.name]);
- break;
-
default:
Logger.severe(Logger.TYPE_INTERNAL,
"Unhandled extension (id typo?): " + ext.name);
diff --git a/src/content/lib/request.jsm b/src/content/lib/request.jsm
index d5cbbbf..d49d66f 100644
--- a/src/content/lib/request.jsm
+++ b/src/content/lib/request.jsm
@@ -223,7 +223,19 @@ NormalRequest.prototype.isInternal = function() {
return true;
}
- // see issue #784
+ // Necessary for some Add-ons, e.g. "rikaichan" or "Grab and Drag"
+ // References:
+ // - RP issue #784
+ if (this.aContentLocation.scheme === "chrome" &&
+ this.aContentLocation.path.startsWith("/skin/")) {
+ return true;
+ }
+
+ // Empty iframes will have the "about:blank" URI. Sometimes websites
+ // create an empty iframe and then manipulate it.
+ // References:
+ // - NoScript FAQ: https://noscript.net/faq#qa1_9
+ // - RP issue #784
if (this.aContentLocation.spec === "about:blank") {
return true;
}
diff --git a/tests/content/internal-destinations_1.html b/tests/content/internal-destinations_1.html
new file mode 100644
index 0000000..1a6ee2f
--- /dev/null
+++ b/tests/content/internal-destinations_1.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<html>
+<head>
+ <meta charset="utf-8" />
+</head>
+<body>
+
+<p>
+ "chrome://rpcontinued/skin/requestpolicy-icon-blocked.png" <br />
+ <img src="chrome://rpcontinued/skin/requestpolicy-icon-blocked.png"/>
+</p>
+
+</body>
+</html>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git
More information about the Pkg-mozext-commits
mailing list