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,6 +783,11 @@
Components.interfaces.nsIScriptSecurityManager; Components.interfaces.nsIScriptSecurityManager;
try { try {
// 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, secMan.checkLoadURI(origURI, uri,
nsIScriptSecMan.DISALLOW_SCRIPT); nsIScriptSecMan.DISALLOW_SCRIPT);
} catch(e) { } catch(e) {

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

@ -705,6 +705,11 @@
Components.interfaces.nsIScriptSecurityManager; Components.interfaces.nsIScriptSecurityManager;
try { try {
// 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, secMan.checkLoadURI(origURI, uri,
nsIScriptSecMan.DISALLOW_SCRIPT); nsIScriptSecMan.DISALLOW_SCRIPT);
} catch(e) { } catch(e) {