Browse Source

Revert rev. 878e473001bf and rev. dd7526781151 as the extra check was unneeded and incorrect.

1.1.101
Jorg Knobloch 2 years ago
parent
commit
ee21d407fd
1 changed files with 9 additions and 5 deletions
  1. +9
    -5
      addon/content/modules/pEp.js

+ 9
- 5
addon/content/modules/pEp.js View File

@ -15,8 +15,6 @@
*/
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
var { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
const EXPORTED_SYMBOLS = ["pEp"];
@ -60,6 +58,14 @@ class pEp {
// pEp.instance = null;
}
/*
var { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
var { fixIterator } = ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
// This function was introduced to track down P4TB-355 (which turned out to be ENGINE-862).
// It erroneously shows an alert when a privacy handshake is made for a message sent to
// a mailing list. In this case, no Thunderbird identity exists, but an own identity
// with the corresponding private key exists in the database. See P4TB-326:
// https://pep-security.lu/dev/repos/pEp_for_Thunderbird/rev/438809b80549
check_myself(id) {
this.log.debug("check myself() for", id && id.address);
if (!(id && id.address)) return;
@ -76,6 +82,7 @@ class pEp {
win.alert(`Myself for ${id.address} which is NOT an own identity`);
}
}
*/
async serverVersion() {
this.log.info("pEp: serverVersion()");
@ -86,7 +93,6 @@ class pEp {
* Function called on send mail
*/
async cache_encrypt_message(message, encodingFormat = ENC_FORMAT_PEP, isDraftOrTemplate = false) {
this.check_myself(message.from);
message.dir = DIR_OUTGOING;
message.enc_format = encodingFormat;
let encryptedMessage = await this.adapter.cache_encrypt_message(message, isDraftOrTemplate);
@ -97,7 +103,6 @@ class pEp {
* Function called on open mail
*/
async cache_decrypt_message(message) {
this.check_myself(message.recv_by);
message.dir = DIR_INCOMING;
let decryptedMessage = await this.adapter.cache_decrypt_message(message);
return pEp.Message.fromJSON(decryptedMessage);
@ -134,7 +139,6 @@ class pEp {
}
async myself(identity) {
this.check_myself(identity);
this.log.info("pEp: myself()");
// Workaround for ENGINE-753.
// Code was: return this.adapter.myself(identity);


Loading…
Cancel
Save