Bug 1460685 - Backed out changeset 09ee763947c3 (bug 1352513);r=Gijs
authorBrian Grinstead <bgrinstead@mozilla.com>
Fri, 11 May 2018 16:26:07 -0700
changeset 418263 f915e7d86ab8334ebb266b1611c617db479522d9
parent 418262 2916d6d70f27cf21b00b45b9f3cca6e7071c655c
child 418264 f1de7aa432285d662f9e27aa72a017a812e3f86f
push id33997
push userncsoregi@mozilla.com
push dateTue, 15 May 2018 09:53:53 +0000
treeherdermozilla-central@cf3ee1402348 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1460685, 1352513, 1145470
milestone62.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 1460685 - Backed out changeset 09ee763947c3 (bug 1352513);r=Gijs The security.allow_chrome_frames_inside_content pref was added to support XUL extension compat after the hiddenWindow special case was removed in Bug 1145470. Since we don't need to support that use-case anymore, this changeset backs out the change that relanded the special case with the pref. MozReview-Commit-ID: 4keMEIQvt1Y
caps/nsScriptSecurityManager.cpp
modules/libpref/init/all.js
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -975,33 +975,16 @@ nsScriptSecurityManager::CheckLoadURIFla
                     reg->AllowContentToAccess(aTargetBaseURI, &accessAllowed);
                     if (accessAllowed) {
                         return NS_OK;
                     }
                 }
             }
         }
 
-        static bool sCanLoadChromeInContent = false;
-        static bool sCachedCanLoadChromeInContentPref = false;
-        if (!sCachedCanLoadChromeInContentPref) {
-            sCachedCanLoadChromeInContentPref = true;
-            mozilla::Preferences::AddBoolVarCache(&sCanLoadChromeInContent,
-                "security.allow_chrome_frames_inside_content");
-        }
-        if (sCanLoadChromeInContent) {
-            // Special-case the hidden window: it's allowed to load
-            // URI_IS_UI_RESOURCE no matter what.  Bug 1145470 tracks removing this.
-            nsAutoCString sourceSpec;
-            if (NS_SUCCEEDED(aSourceBaseURI->GetSpec(sourceSpec)) &&
-                sourceSpec.EqualsLiteral("resource://gre-resources/hiddenWindow.html")) {
-                return NS_OK;
-            }
-        }
-
         if (reportErrors) {
             ReportError(nullptr, errorTag, aSourceURI, aTargetURI);
         }
         return NS_ERROR_DOM_BAD_URI;
     }
 
     // Check for target URI pointing to a file
     rv = NS_URIChainHasFlags(aTargetURI,
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2514,20 +2514,16 @@ pref("security.cert_pinning.enforcement_
 // This is to prevent accidental pinning from MITM devices and is used
 // for tests.
 pref("security.cert_pinning.process_headers_from_non_builtin_roots", false);
 
 // If set to true, allow view-source URIs to be opened from URIs that share
 // their protocol with the inner URI of the view-source URI
 pref("security.view-source.reachable-from-inner-protocol", false);
 
-// If set to true, in some limited circumstances it may be possible to load
-// privileged content in frames inside unprivileged content.
-pref("security.allow_chrome_frames_inside_content", false);
-
 // Services security settings
 pref("services.settings.server", "https://firefox.settings.services.mozilla.com/v1");
 pref("services.settings.changes.path", "/buckets/monitor/collections/changes/records");
 pref("services.settings.default_bucket", "main");
 pref("services.settings.default_signer", "remote-settings.content-signature.mozilla.org");
 
 // Blocklist preferences
 pref("extensions.blocklist.enabled", true);