[Pkg-mozext-commits] [tabmixplus] 47/73: Bug 1093642 - Part 2: Decide if we allow mixed content before sending click event to remote tab
David Prévot
taffit at moszumanska.debian.org
Mon May 9 02:30:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit f4de880546eb38c248dac6e659d8956035f6912c
Author: onemen <tabmix.onemen at gmail.com>
Date: Sat Apr 23 15:09:01 2016 +0300
Bug 1093642 - Part 2: Decide if we allow mixed content before sending click event to remote tab
---
chrome/content/content.js | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/chrome/content/content.js b/chrome/content/content.js
index b85f915..a5119f6 100644
--- a/chrome/content/content.js
+++ b/chrome/content/content.js
@@ -264,6 +264,25 @@ TabmixClickEventHandler = {
}
json.noReferrer = TabmixSvc.version(370) && BrowserUtils.linkHasNoReferrer(node);
+ if (TabmixSvc.version(480)) {
+ // Check if the link needs to be opened with mixed content allowed.
+ // Only when the owner doc has |mixedContentChannel| and the same origin
+ // should we allow mixed content.
+ json.allowMixedContent = false;
+ let docshell = ownerDoc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsIDocShell);
+ if (docShell.mixedContentChannel) {
+ const sm = Services.scriptSecurityManager;
+ try {
+ let targetURI = BrowserUtils.makeURI(href);
+ sm.checkSameOriginURI(docshell.mixedContentChannel.URI, targetURI, false);
+ json.allowMixedContent = true;
+ } catch (ex) {
+ }
+ }
+ }
+
sendAsyncMessage("Content:Click", json);
return;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list