[Pkg-mozext-commits] [requestpolicy] 41/50: [fix] allow "about:blank" as destination

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 7e4d7685e9b0fc7fb32d9c0ac051aaf2ee70faf5
Author: Martin Kimmerle <dev at 256k.de>
Date:   Sun Jun 26 11:39:33 2016 +0200

    [fix] allow "about:blank" as destination
    
    See issue #784
---
 ChangeLog.md                            |  5 +++++
 src/content/lib/request.jsm             |  5 +++++
 tests/content/iframe_5_about-blank.html | 13 +++++++++++++
 3 files changed, 23 insertions(+)

diff --git a/ChangeLog.md b/ChangeLog.md
index bce4e64..ebeefe3 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -3,6 +3,11 @@
 Note: ChangeLogs for the source code and unit tests, both not relevant for
       users, you can find in the dedicated subdirectories.
 
+#### Version 1.0.beta12.2
+* bugfixes
+  * "about:blank" is now defined as an "internal" request and thus
+    whitelisted (#784).
+
 #### Version 1.0.beta12.1
 * bugfixes
   * The menu overlay of some Add-Ons did not work; it stayed blank.
diff --git a/src/content/lib/request.jsm b/src/content/lib/request.jsm
index df52926..d5cbbbf 100644
--- a/src/content/lib/request.jsm
+++ b/src/content/lib/request.jsm
@@ -223,6 +223,11 @@ NormalRequest.prototype.isInternal = function() {
     return true;
   }
 
+  // see issue #784
+  if (this.aContentLocation.spec === "about:blank") {
+    return true;
+  }
+
   // see issue #180
   if (this.aRequestOrigin.scheme === "about" &&
       this.aRequestOrigin.spec.indexOf("about:neterror?") === 0) {
diff --git a/tests/content/iframe_5_about-blank.html b/tests/content/iframe_5_about-blank.html
new file mode 100644
index 0000000..039d0df
--- /dev/null
+++ b/tests/content/iframe_5_about-blank.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<html>
+  <head>
+    <meta charset="utf-8" />
+  </head>
+  <body>
+
+    <h2>about:blank</h2>
+
+    <iframe href="about:blank"></iframe>
+
+  </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