зеркало из https://github.com/mozilla/gecko-dev.git
Bug358121 --> nsIMsgMailNewsUrl.folder can throw a JS exception when opening .eml files. This causes things like the phishing detector to not work. sr=bienvenu
This commit is contained in:
Родитель
529159dff8
Коммит
fb1a877d2e
|
@ -2539,7 +2539,13 @@ function OnMsgLoaded(aUrl)
|
|||
if (!aUrl)
|
||||
return;
|
||||
|
||||
var folder = aUrl.folder;
|
||||
// nsIMsgMailNewsUrl.folder throws an error when opening .eml files.
|
||||
var folder;
|
||||
try {
|
||||
folder = aUrl.folder;
|
||||
}
|
||||
catch (ex) {}
|
||||
|
||||
var msgURI = GetLoadedMessage();
|
||||
var msgHdr = null;
|
||||
|
||||
|
|
|
@ -57,8 +57,14 @@ function isMsgEmailScam(aUrl)
|
|||
return isEmailScam;
|
||||
|
||||
// Ignore nntp and RSS messages
|
||||
var folder = aUrl.folder;
|
||||
if (folder.server.type == 'nntp' || folder.server.type == 'rss')
|
||||
// nsIMsgMailNewsUrl.folder can throw an error, especially if we are opening
|
||||
// a .eml message.
|
||||
var folder;
|
||||
try {
|
||||
folder = aUrl.folder;
|
||||
} catch (ex) {}
|
||||
|
||||
if (folder && (folder.server.type == 'nntp' || folder.server.type == 'rss'))
|
||||
return isEmailScam;
|
||||
|
||||
// loop through all of the link nodes in the message's DOM, looking for phishing URLs...
|
||||
|
|
Загрузка…
Ссылка в новой задаче