From 0ac9af0da68a6c2344070e7dec58b123114cd12b Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Wed, 12 Jul 2000 00:17:07 +0000 Subject: [PATCH] Fix for XBL being able to execute scripts in skins. Bugzilla is down, so I can't give the number. r=danm --- chrome/src/nsChromeRegistry.cpp | 10 +++++----- rdf/chrome/src/nsChromeRegistry.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/chrome/src/nsChromeRegistry.cpp b/chrome/src/nsChromeRegistry.cpp index 77bf75502b8..eadad6acb38 100644 --- a/chrome/src/nsChromeRegistry.cpp +++ b/chrome/src/nsChromeRegistry.cpp @@ -1710,8 +1710,8 @@ NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCString& aProviderType, } } - // See if we're a packages seq in a skin/locale. If so, we need to set up the baseURL and - // the package arcs. + // See if we're a packages seq in a skin/locale. If so, we need to set up the baseURL, allowScripts + // and package arcs. if (val.Find(":packages") != -1 && !aProviderType.Equals(nsCAutoString("package"))) { // Iterate over our kids a second time. nsCOMPtr seqKids; @@ -1724,7 +1724,9 @@ NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCString& aProviderType, nsCOMPtr entry(do_QueryInterface(supp)); if (entry) { nsChromeRegistry::UpdateArc(installSource, entry, mBaseURL, baseLiteral, aRemove); - + if (aProviderType.Equals(nsCAutoString("skin")) && !aAllowScripts) + nsChromeRegistry::UpdateArc(installSource, entry, mAllowScripts, scriptLiteral, aRemove); + // Now set up the package arc. const char* val; entry->GetValueConst(&val); @@ -1764,8 +1766,6 @@ NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCString& aProviderType, // We are the main entry for a skin/locale. // Set up our loctype and our script access nsChromeRegistry::UpdateArc(installSource, resource, mLocType, locLiteral, aRemove); - if (aProviderType.Equals(nsCAutoString("skin")) && !aAllowScripts) - nsChromeRegistry::UpdateArc(installSource, resource, mAllowScripts, scriptLiteral, aRemove); } nsCOMPtr newTarget; diff --git a/rdf/chrome/src/nsChromeRegistry.cpp b/rdf/chrome/src/nsChromeRegistry.cpp index 77bf75502b8..eadad6acb38 100644 --- a/rdf/chrome/src/nsChromeRegistry.cpp +++ b/rdf/chrome/src/nsChromeRegistry.cpp @@ -1710,8 +1710,8 @@ NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCString& aProviderType, } } - // See if we're a packages seq in a skin/locale. If so, we need to set up the baseURL and - // the package arcs. + // See if we're a packages seq in a skin/locale. If so, we need to set up the baseURL, allowScripts + // and package arcs. if (val.Find(":packages") != -1 && !aProviderType.Equals(nsCAutoString("package"))) { // Iterate over our kids a second time. nsCOMPtr seqKids; @@ -1724,7 +1724,9 @@ NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCString& aProviderType, nsCOMPtr entry(do_QueryInterface(supp)); if (entry) { nsChromeRegistry::UpdateArc(installSource, entry, mBaseURL, baseLiteral, aRemove); - + if (aProviderType.Equals(nsCAutoString("skin")) && !aAllowScripts) + nsChromeRegistry::UpdateArc(installSource, entry, mAllowScripts, scriptLiteral, aRemove); + // Now set up the package arc. const char* val; entry->GetValueConst(&val); @@ -1764,8 +1766,6 @@ NS_IMETHODIMP nsChromeRegistry::InstallProvider(const nsCString& aProviderType, // We are the main entry for a skin/locale. // Set up our loctype and our script access nsChromeRegistry::UpdateArc(installSource, resource, mLocType, locLiteral, aRemove); - if (aProviderType.Equals(nsCAutoString("skin")) && !aAllowScripts) - nsChromeRegistry::UpdateArc(installSource, resource, mAllowScripts, scriptLiteral, aRemove); } nsCOMPtr newTarget;