Bug 1235876 - Check scheme before handling lightweight theme events. r=Gijs, a=ritu
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Wed, 30 Dec 2015 15:00:56 -0500
changeset 310602 47dce920f0275ed279d6715223e9a449271a71c2
parent 310601 8255ad6f81e7b6ba65ab30050185efe4c1f91814
child 310603 b07f254acc0f33b820d12e13813bda0d36db06ac
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, ritu
bugs1235876
milestone45.0a2
Bug 1235876 - Check scheme before handling lightweight theme events. r=Gijs, a=ritu
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3241,16 +3241,20 @@ var LightWeightThemeWebInstaller = {
 
   _isAllowed: function (node) {
     // Make sure the whitelist has been imported to permissions
     PermissionsUtils.importFromPrefs("xpinstall.", "install");
 
     let pm = Services.perms;
 
     let uri = node.ownerDocument.documentURIObject;
+    if (!uri.schemeIs("https")) {
+      return false;
+    }
+
     return pm.testPermission(uri, "install") == pm.ALLOW_ACTION;
   },
 
   _getThemeFromNode: function (node) {
     return this._manager.parseTheme(node.getAttribute("data-browsertheme"), node.baseURI);
   }
 };