mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 392079 - Don't pass bad URIs from link elements beyond extractFromPage. r=myk
This commit is contained in:
parent
514aab2c87
commit
b641790654
@ -1560,16 +1560,9 @@ MicrosummarySet.prototype = {
|
|||||||
resource.content.characterSet,
|
resource.content.characterSet,
|
||||||
null);
|
null);
|
||||||
|
|
||||||
try {
|
if (!/^https?$/i.test(generatorURI.scheme)) {
|
||||||
const securityManager = Cc["@mozilla.org/scriptsecuritymanager;1"].
|
|
||||||
getService(Ci.nsIScriptSecurityManager);
|
|
||||||
securityManager.checkLoadURI(resource.uri,
|
|
||||||
generatorURI,
|
|
||||||
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
|
|
||||||
}
|
|
||||||
catch(e) {
|
|
||||||
LOG("can't load generator " + generatorURI.spec + " from page " +
|
LOG("can't load generator " + generatorURI.spec + " from page " +
|
||||||
resource.uri.spec + ": " + e);
|
resource.uri.spec);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,12 +574,9 @@ var BookmarkPropertiesPanel = {
|
|||||||
this._bookmarkId);
|
this._bookmarkId);
|
||||||
}
|
}
|
||||||
catch(ex) {
|
catch(ex) {
|
||||||
// getMicrosummaries will throw an exception in at least two cases:
|
// getMicrosummaries will throw an exception if the page to which the URI
|
||||||
// 1. the bookmarked URI contains a scheme that the service won't
|
// refers isn't HTML or XML (the only two content types the service knows
|
||||||
// download for security reasons (currently it only handles http,
|
// how to summarize).
|
||||||
// https, and file);
|
|
||||||
// 2. the page to which the URI refers isn't HTML or XML (the only two
|
|
||||||
// content types the service knows how to summarize).
|
|
||||||
this._microsummaries = null;
|
this._microsummaries = null;
|
||||||
}
|
}
|
||||||
if (this._microsummaries) {
|
if (this._microsummaries) {
|
||||||
|
Loading…
Reference in New Issue
Block a user