Bug 1886396 - Minimize false positive reporting of partial OpenPGP message. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D205196 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
bec624ce10
Коммит
c911998f43
|
@ -315,18 +315,6 @@ Enigmail.msg = {
|
|||
},
|
||||
*/
|
||||
|
||||
messageImport() {
|
||||
EnigmailLog.DEBUG("enigmailMessengerOverlay.js: messageImport:\n");
|
||||
|
||||
return this.messageParse(
|
||||
true,
|
||||
true,
|
||||
"",
|
||||
this.getCurrentMsgUriSpec(),
|
||||
false
|
||||
);
|
||||
},
|
||||
|
||||
/***
|
||||
* check that handler for multipart/signed is set to Enigmail.
|
||||
* if handler is different, change it and reload message
|
||||
|
@ -819,7 +807,6 @@ Enigmail.msg = {
|
|||
}
|
||||
|
||||
const topElement = bodyElement;
|
||||
var findStr = /* interactive ? null : */ "-----BEGIN PGP";
|
||||
var msgText = null;
|
||||
var foundIndex = -1;
|
||||
|
||||
|
@ -844,7 +831,7 @@ Enigmail.msg = {
|
|||
break;
|
||||
}
|
||||
|
||||
foundIndex = node.textContent.indexOf(findStr);
|
||||
foundIndex = node.textContent.indexOf("-----BEGIN PGP");
|
||||
|
||||
if (foundIndex < 0) {
|
||||
hasHeadOrTailNode = true;
|
||||
|
@ -852,15 +839,15 @@ Enigmail.msg = {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (foundIndex >= 0) {
|
||||
if (
|
||||
node.textContent.indexOf(findStr + " LICENSE AUTHORIZATION") ==
|
||||
if (
|
||||
node.textContent.indexOf("-----BEGIN PGP SIGNED MESSAGE-----") !=
|
||||
foundIndex &&
|
||||
node.textContent.indexOf("-----BEGIN PGP MESSAGE-----") !=
|
||||
foundIndex
|
||||
) {
|
||||
foundIndex = -1;
|
||||
node = node.nextSibling;
|
||||
continue;
|
||||
}
|
||||
) {
|
||||
foundIndex = -1;
|
||||
node = node.nextSibling;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (foundIndex === 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче