Bug 1262218 - Update permissions for APIs used for addon discovery. r=rhelmer
authorAndrew Swan <aswan@mozilla.com>
Fri, 15 Apr 2016 16:04:01 -0700
changeset 293958 6f7203377bf7871fe80ac0f3b23e0a23a57cdbfb
parent 293957 170eb8db5f8c99212b07756ce67ef86c45d7c229
child 293959 0e7e5f7ecc07204c7fa02740e43b574ce64ad0c1
push id75396
push usercbook@mozilla.com
push dateWed, 20 Apr 2016 09:52:18 +0000
treeherdermozilla-inbound@c10de64dc242 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhelmer
bugs1262218
milestone48.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 1262218 - Update permissions for APIs used for addon discovery. r=rhelmer MozReview-Commit-ID: H7xXTpnsCC2
browser/app/permissions
toolkit/mozapps/extensions/AddonManagerWebAPI.cpp
--- a/browser/app/permissions
+++ b/browser/app/permissions
@@ -6,17 +6,17 @@
 # * permission is an integer between 1 and 15
 # See nsPermissionManager.cpp for more...
 
 # UITour
 origin	uitour	1	https://www.mozilla.org
 origin	uitour	1	https://self-repair.mozilla.org
 origin	uitour	1	https://support.mozilla.org
 origin	uitour	1	https://addons.mozilla.org
-origin	uitour	1	https://services.addons.mozilla.org
+origin	uitour	1	https://discovery.addons.mozilla.org
 origin	uitour	1	about:home
 
 # XPInstall
 origin	install	1	https://addons.mozilla.org
 
 # Remote troubleshooting
 origin	remote-troubleshooting	1	https://input.mozilla.org
 origin	remote-troubleshooting	1	https://support.mozilla.org
--- a/toolkit/mozapps/extensions/AddonManagerWebAPI.cpp
+++ b/toolkit/mozapps/extensions/AddonManagerWebAPI.cpp
@@ -35,26 +35,26 @@ AddonManagerWebAPI::IsValidSite(nsIURI* 
 
   nsCString host;
   rv = uri->GetHost(host);
   if (NS_FAILED(rv)) {
     return false;
   }
 
   if (host.Equals("addons.mozilla.org") ||
-      host.Equals("services.addons.mozilla.org")) {
+      host.Equals("discovery.addons.mozilla.org")) {
     return true;
   }
 
   // When testing allow access to the developer sites.
   if (Preferences::GetBool("extensions.webapi.testing", false)) {
     if (host.Equals("addons.allizom.org") ||
-        host.Equals("services.addons.allizom.org") ||
+        host.Equals("discovery.addons.allizom.org") ||
         host.Equals("addons-dev.allizom.org") ||
-        host.Equals("services.addons-dev.allizom.org") ||
+        host.Equals("discovery.addons-dev.allizom.org") ||
         host.Equals("example.com")) {
       return true;
     }
   }
 
   return false;
 }