Bug 1021667 - Give Activity Stream URI_SAFE_FOR_UNTRUSTED_CONTENT r=ckerschb,Gijs
authorUrsula Sarracini
Thu, 27 Jul 2017 10:43:48 -0400
changeset 420383 6726399b5bbbca61943f70ac78e50ae58443ede8
parent 420382 639e49a6841b3446a01c6e7cb9808f2574d2562f
child 420384 2b9ebd337cf1b214e7f3de43a2b2cb9e756c2b31
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckerschb, Gijs
bugs1021667
milestone56.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 1021667 - Give Activity Stream URI_SAFE_FOR_UNTRUSTED_CONTENT r=ckerschb,Gijs MozReview-Commit-ID: A7A2ThcpCeR
browser/components/about/AboutRedirector.cpp
browser/components/originattributes/test/browser/browser_firstPartyIsolation_aboutPages.js
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -219,17 +219,18 @@ AboutRedirector::GetURIFlags(nsIURI *aUR
 
       // Once ActivityStream is fully rolled out and we've removed Tiles,
       // this special case can go away and the flag can just become part
       // of the normal about:newtab entry in kRedirMap.
       if (name.EqualsLiteral("newtab")) {
         if (sActivityStreamEnabled) {
           *result = redir.flags |
             nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
-            nsIAboutModule::ENABLE_INDEXED_DB;
+            nsIAboutModule::ENABLE_INDEXED_DB |
+            nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT;
           return NS_OK;
         }
       }
 
       *result = redir.flags;
       return NS_OK;
     }
   }
--- a/browser/components/originattributes/test/browser/browser_firstPartyIsolation_aboutPages.js
+++ b/browser/components/originattributes/test/browser/browser_firstPartyIsolation_aboutPages.js
@@ -151,17 +151,19 @@ add_task(async function test_aboutURL() 
       let flags = am.getURIFlags(uri);
 
       // We load pages with URI_SAFE_FOR_UNTRUSTED_CONTENT set, this means they
       // are not loaded with System Principal but with codebase principal.
       // Also we skip pages with HIDE_FROM_ABOUTABOUT, some of them may have
       // errors while loading.
       if ((flags & Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT) &&
           !(flags & Ci.nsIAboutModule.HIDE_FROM_ABOUTABOUT) &&
-          networkURLs.indexOf(aboutType) == -1) {
+          networkURLs.indexOf(aboutType) == -1 &&
+          // Exclude about:newtab see Bug 1021667
+          aboutType !== "newtab") {
         aboutURLs.push(aboutType);
       }
     } catch (e) {
       // getService might have thrown if the component doesn't actually
       // implement nsIAboutModule
     }
   }