Bug 292624 - XUL error pages should not have chrome privileges, r=darin sr=dveditz a=asa

git-svn-id: svn://10.0.0.236/trunk@176101 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bsmedberg%covad.net
2005-07-14 17:46:55 +00:00
parent f2e223d471
commit 2d3b479c81
9 changed files with 111 additions and 124 deletions

View File

@@ -3051,21 +3051,8 @@ nsDocShell::LoadErrorPage(nsIURI *aURI, const PRUnichar *aURL,
char *escapedError = nsEscape(NS_ConvertUTF16toUTF8(aErrorType).get(), url_Path);
char *escapedDescription = nsEscape(NS_ConvertUTF16toUTF8(aDescription).get(), url_Path);
nsXPIDLCString errorPageUrl;
nsCString errorPageUrl("about:neterror?e=");
nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
if (prefBranch)
{
// Note that we don't expose this pref, because we don't want users fiddling with it.
prefBranch->GetCharPref("browser.xul.error_pages.location", getter_Copies(errorPageUrl));
}
if (errorPageUrl.IsEmpty())
{
errorPageUrl.AssignLiteral("chrome://global/content/netError.xhtml");
}
errorPageUrl.AppendLiteral("?e=");
errorPageUrl.AppendASCII(escapedError);
errorPageUrl.AppendLiteral("&u=");
errorPageUrl.AppendASCII(escapedUrl);