Fixing 56009, exploit allowing XPConnect access. r,a=hyatt, sr=scc

git-svn-id: svn://10.0.0.236/trunk@81158 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mstoltz%netscape.com
2000-10-13 22:59:47 +00:00
parent b80345d74a
commit 9351f77d32
22 changed files with 92 additions and 61 deletions

View File

@@ -724,7 +724,8 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI,
nsCOMPtr<nsIURL> url = do_QueryInterface(aURI);
nsXPIDLCString fileExtension;
rv = url->GetFileExtension(getter_Copies(fileExtension));
if (PL_strcmp(fileExtension, "xul") == 0)
if (PL_strcasecmp(fileExtension, "xul") == 0 || PL_strcasecmp(fileExtension, "html") == 0 ||
PL_strcasecmp(fileExtension, "xml") == 0)
{
NS_WITH_SERVICE(nsIScriptSecurityManager, securityManager,
NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);