Bug 1199639 - Block access to about:addons for guest profiles. r=mhaigh
authorSebastian Kaspari <s.kaspari@gmail.com>
Fri, 28 Aug 2015 16:37:35 +0200
changeset 293135 ea037342780d19a8e539c755f3be46a90bc3f77e
parent 293134 40b4be91ecf052a7f713990cdf7cdfcad5b16540
child 293136 9af574254ea0f28eb8269d92c290150dda28bd1d
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhaigh
bugs1199639
milestone43.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 1199639 - Block access to about:addons for guest profiles. r=mhaigh
mobile/android/base/restrictions/GuestProfileConfiguration.java
--- a/mobile/android/base/restrictions/GuestProfileConfiguration.java
+++ b/mobile/android/base/restrictions/GuestProfileConfiguration.java
@@ -34,17 +34,18 @@ public class GuestProfileConfiguration i
             "file",
             "chrome",
             "resource",
             "jar",
             "wyciwyg"
     );
 
     private static final List<String> BANNED_URLS = Arrays.asList(
-            "about:config"
+            "about:config",
+            "about:addons"
     );
 
     @Override
     public boolean isAllowed(Restriction restriction) {
         return !DEFAULT_RESTRICTIONS.contains(restriction);
     }
 
     @Override
@@ -55,16 +56,17 @@ public class GuestProfileConfiguration i
         }
 
         final Uri u = Uri.parse(url);
         final String scheme = u.getScheme();
         if (BANNED_SCHEMES.contains(scheme)) {
             return false;
         }
 
+        url = url.toLowerCase();
         for (String banned : BANNED_URLS) {
             if (url.startsWith(banned)) {
                 return false;
             }
         }
 
         return true;
     }