Bug 1426363 Fix host permission parsing for permission strings r=rpl a=abillings
authorAndrew Swan <aswan@mozilla.com>
Thu, 21 Dec 2017 11:37:34 -0800
changeset 397674 4d1355701c926172d8f9825813e9f7e66421536a
parent 397673 44f6455da33e3c8bd32df9611de89d20c771b0d7
child 397675 5a29258e113d285dc2c9692b0f09c672554b5812
push id33188
push userebalazs@mozilla.com
push dateThu, 04 Jan 2018 08:01:54 +0000
treeherdermozilla-central@5afa32a16a2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrpl, abillings
bugs1426363
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1426363 Fix host permission parsing for permission strings r=rpl a=abillings MozReview-Commit-ID: BeisQwgKak9
toolkit/components/extensions/Extension.jsm
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -808,17 +808,17 @@ class ExtensionData {
     for (let permission of perms.origins) {
       if (permission == "<all_urls>") {
         allUrls = true;
         break;
       }
       if (permission.startsWith("moz-extension:")) {
         continue;
       }
-      let match = /^https?:\/\/([^/]+)\//.exec(permission);
+      let match = /^[a-z*]+:\/\/([^/]+)\//.exec(permission);
       if (!match) {
         Cu.reportError(`Unparseable host permission ${permission}`);
         continue;
       }
       if (match[1] == "*") {
         allUrls = true;
       } else if (match[1].startsWith("*.")) {
         wildcards.add(match[1].slice(2));