зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
73ca7ae764
Коммит
1367551f57
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче