Browse Source

P4TB-394: Allow only one passphrase prompt at any given time. Version 1.1.108-preview-2.

master
Jörg Knobloch 1 year ago
parent
commit
26f1862a40
2 changed files with 5 additions and 1 deletions
  1. +4
    -0
      addon/content/pEpForThunderbird.js
  2. +1
    -1
      addon/manifest.json

+ 4
- 0
addon/content/pEpForThunderbird.js View File

@ -65,6 +65,7 @@ class pEpForThunderbird extends pEp {
this.protectSubjects = true;
this.isControllerAlert = false;
this.alertFolder = null;
this.passphrasePromptActive = false;
this.MOZ_APP_VERSION = parseInt(AppConstants.MOZ_APP_VERSION, 10);
this.platform = AppConstants.platform;
@ -73,6 +74,8 @@ class pEpForThunderbird extends pEp {
}
getPassphrase(reason) {
if (this.passphrasePromptActive) return null;
this.passphrasePromptActive = true;
let promptSvc = Cc["@mozilla.org/embedcomp/prompt-service;1"].getService(Ci.nsIPromptService);
let passphrase = { value: "" };
let check = { value: false };
@ -83,6 +86,7 @@ class pEpForThunderbird extends pEp {
let passphraseTitle = this.localeMessagesMap.get("passphrasetitle");
let win = Services.wm.getMostRecentWindow("mail:3pane");
let result = promptSvc.promptPassword(win, passphraseTitle, prompt, passphrase, null, check);
this.passphrasePromptActive = false;
return result ? passphrase.value : null;
}


+ 1
- 1
addon/manifest.json View File

@ -4,7 +4,7 @@
"description": "p≡p message encryption and authentication",
"author": "p≡p Team for Thunderbird",
"homepage_url": "https://pep.security",
"version": "1.1.108-preview-1",
"version": "1.1.108-preview-2",
"default_locale": "en",
"applications": {
"gecko": {


Loading…
Cancel
Save