зеркало из 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,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) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче