301119 allow error pages to load favicons

xpfe:
dveditz: second-review+
benjamin: first-review+
asa: approval1.8b4+
toolkit:
benjamin: first-review+
benjamin: approval1.8b4+

patch by me, ported to toolkit by Henrik Skupin <hskupin@gmail.com>
This commit is contained in:
cbiesinger%web.de 2005-08-08 16:25:11 +00:00
Родитель 73ca7ae764
Коммит 1367551f57
2 изменённых файлов: 14 добавлений и 4 удалений

Просмотреть файл

@ -783,8 +783,13 @@
Components.interfaces.nsIScriptSecurityManager;
try {
secMan.checkLoadURI(origURI, uri,
nsIScriptSecMan.DISALLOW_SCRIPT);
// error pages can load their favicon
// to be on the safe side, only allow chrome:// favicons
const aboutNeterr = "about:neterror?";
if (origURI.spec.substr(0, aboutNeterr.length) != aboutNeterr ||
!uri.schemeIs("chrome"))
secMan.checkLoadURI(origURI, uri,
nsIScriptSecMan.DISALLOW_SCRIPT);
} catch(e) {
return;
}

Просмотреть файл

@ -705,8 +705,13 @@
Components.interfaces.nsIScriptSecurityManager;
try {
secMan.checkLoadURI(origURI, uri,
nsIScriptSecMan.DISALLOW_SCRIPT);
// error pages can load their favicon
// to be on the safe side, only allow chrome:// favicons
const aboutNeterr = "about:neterror?";
if (origURI.spec.substr(0, aboutNeterr.length) != aboutNeterr ||
!uri.schemeIs("chrome"))
secMan.checkLoadURI(origURI, uri,
nsIScriptSecMan.DISALLOW_SCRIPT);
} catch(e) {
return;
}