From f56195c7a3cb0e32563c9f06939bcd3b26e31ca4 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Fri, 30 Dec 2011 09:35:52 -0800 Subject: [PATCH] Bug 713747 - Remove UniversalFoo from caps (and thus, the tree). r=bz --- caps/src/nsScriptSecurityManager.cpp | 17 ++--------------- .../en-US/chrome/security/caps.properties | 5 ----- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/caps/src/nsScriptSecurityManager.cpp b/caps/src/nsScriptSecurityManager.cpp index 9e5c2b844026..1da894c2a56d 100644 --- a/caps/src/nsScriptSecurityManager.cpp +++ b/caps/src/nsScriptSecurityManager.cpp @@ -1088,19 +1088,6 @@ nsScriptSecurityManager::CheckSameOriginDOMProp(nsIPrincipal* aSubject, if (aObject == mSystemPrincipal) return NS_ERROR_DOM_PROP_ACCESS_DENIED; - /* - * If we failed the origin tests it still might be the case that we - * are a signed script and have permissions to do this operation. - * Check for that here. - */ - bool capabilityEnabled = false; - const char* cap = aAction == nsIXPCSecurityManager::ACCESS_SET_PROPERTY ? - "UniversalBrowserWrite" : "UniversalBrowserRead"; - rv = IsCapabilityEnabled(cap, &capabilityEnabled); - NS_ENSURE_SUCCESS(rv, rv); - if (capabilityEnabled) - return NS_OK; - /* ** Access tests failed, so now report error. */ @@ -1321,7 +1308,7 @@ nsScriptSecurityManager::CheckLoadURIFromScript(JSContext *cx, nsIURI *aURI) } // See if we're attempting to load a file: URI. If so, let a - // UniversalFileRead capability trump the above check. + // UniversalXPConnect capability trump the above check. bool isFile = false; bool isRes = false; if (NS_FAILED(aURI->SchemeIs("file", &isFile)) || @@ -1330,7 +1317,7 @@ nsScriptSecurityManager::CheckLoadURIFromScript(JSContext *cx, nsIURI *aURI) if (isFile || isRes) { bool enabled; - if (NS_FAILED(IsCapabilityEnabled("UniversalFileRead", &enabled))) + if (NS_FAILED(IsCapabilityEnabled("UniversalXPConnect", &enabled))) return NS_ERROR_FAILURE; if (enabled) return NS_OK; diff --git a/dom/locales/en-US/chrome/security/caps.properties b/dom/locales/en-US/chrome/security/caps.properties index a5008ccd7ac4..d584ffc39031 100644 --- a/dom/locales/en-US/chrome/security/caps.properties +++ b/dom/locales/en-US/chrome/security/caps.properties @@ -153,9 +153,4 @@ ProtocolFlagError = Warning: Protocol handler for '%S' doesn't advertise a secur # # The following descriptions are shown in the EnableCapabilityQuery dialog # -capdesc.UniversalBrowserRead = Read private data from any site or window -capdesc.UniversalBrowserWrite = Modify any open window capdesc.UniversalXPConnect = Run or install software on your machine -capdesc.UniversalFileRead = Read and upload local files -capdesc.UniversalPreferencesRead = Read program settings -capdesc.UniversalPreferencesWrite = Modify program settings