Commit d2a0c88d authored by Patrick Brunschwig's avatar Patrick Brunschwig

changed protection of subject to opt-in

parent 1a1b95aa
...@@ -28,9 +28,6 @@ pref("extensions.enigmail.agentAdditionalParam", ""); ...@@ -28,9 +28,6 @@ pref("extensions.enigmail.agentAdditionalParam", "");
// path to gpg executable // path to gpg executable
pref("extensions.enigmail.agentPath", ""); pref("extensions.enigmail.agentPath", "");
// allow empty subject line without asking for confirmation
pref("extensions.enigmail.allowEmptySubject", false);
// ** enigmail keySel preferences: // ** enigmail keySel preferences:
// use rules to assign keys // use rules to assign keys
pref("extensions.enigmail.assignKeysByRules", true); pref("extensions.enigmail.assignKeysByRules", true);
...@@ -203,7 +200,8 @@ pref("extensions.enigmail.warnDownloadContactKeys", true); ...@@ -203,7 +200,8 @@ pref("extensions.enigmail.warnDownloadContactKeys", true);
pref("extensions.enigmail.wrapHtmlBeforeSend", true); pref("extensions.enigmail.wrapHtmlBeforeSend", true);
// enable encryption/signing of headers like subject, from, to // enable encryption/signing of headers like subject, from, to
pref("extensions.enigmail.protectHeaders", true); // 1: default: ask user at 1st time use / 0: off / 2: on
pref("extensions.enigmail.protectedHeaders", 1);
pref("extensions.enigmail.protectedSubjectText", ""); pref("extensions.enigmail.protectedSubjectText", "");
// do reset the "references" and "in-reply-to" headers? // do reset the "references" and "in-reply-to" headers?
......
...@@ -650,7 +650,7 @@ Enigmail.msg = { ...@@ -650,7 +650,7 @@ Enigmail.msg = {
this.determineSendFlagId = null; this.determineSendFlagId = null;
this.disableSmime = false; this.disableSmime = false;
this.saveDraftError = 0; this.saveDraftError = 0;
this.protectHeaders = EnigmailPrefs.getPref("protectHeaders"); this.protectHeaders = (EnigmailPrefs.getPref("protectedHeaders") === 2);
this.enableUndoEncryption(false); this.enableUndoEncryption(false);
this.displayProtectHeadersStatus(); this.displayProtectHeadersStatus();
...@@ -892,15 +892,6 @@ Enigmail.msg = { ...@@ -892,15 +892,6 @@ Enigmail.msg = {
}, },
usePpgMimeOption: function(value) {
EnigmailLog.DEBUG("enigmailMessengerOverlay.js: Enigmail.msg.usePpgMimeOption: " + value + "\n");
EnigmailPrefs.setPref("usePGPMimeOption", value);
return true;
},
tempTrustAllKeys: function() { tempTrustAllKeys: function() {
this.trustAllKeys = !this.trustAllKeys; this.trustAllKeys = !this.trustAllKeys;
}, },
...@@ -3825,8 +3816,6 @@ Enigmail.msg = { ...@@ -3825,8 +3816,6 @@ Enigmail.msg = {
} }
} }
var usePGPMimeOption = EnigmailPrefs.getPref("usePGPMimeOption");
if (this.sendPgpMime) { if (this.sendPgpMime) {
// Use PGP/MIME // Use PGP/MIME
sendFlags |= EnigmailConstants.SEND_PGP_MIME; sendFlags |= EnigmailConstants.SEND_PGP_MIME;
...@@ -3945,6 +3934,8 @@ Enigmail.msg = { ...@@ -3945,6 +3934,8 @@ Enigmail.msg = {
var usingPGPMime = (sendFlags & EnigmailConstants.SEND_PGP_MIME) && var usingPGPMime = (sendFlags & EnigmailConstants.SEND_PGP_MIME) &&
(sendFlags & (ENCRYPT | SIGN)); (sendFlags & (ENCRYPT | SIGN));
this.checkProtectHeaders(sendFlags);
// ----------------------- Rewrapping code, taken from function "encryptInline" // ----------------------- Rewrapping code, taken from function "encryptInline"
// Check wrapping, if sign only and inline and plaintext // Check wrapping, if sign only and inline and plaintext
...@@ -4085,11 +4076,28 @@ Enigmail.msg = { ...@@ -4085,11 +4076,28 @@ Enigmail.msg = {
// The encryption process for PGP/MIME messages follows "here". It's // The encryption process for PGP/MIME messages follows "here". It's
// called automatically from nsMsgCompose->sendMsg(). // called automatically from nsMsgCompose->sendMsg().
// registration for this is dome in chrome.manifest // registration for this is done in core.jsm: startup()
return true; return true;
}, },
checkProtectHeaders: function(sendFlags) {
if (!(sendFlags & EnigmailConstants.SEND_PGP_MIME)) return;
if (sendFlags & EnigmailConstants.SEND_ENCRYPTED) {
if ((!this.protectHeaders) && EnigmailPrefs.getPref("protectedHeaders") === 1) {
let enableProtection = EnigmailDialog.confirmDlg(window,
EnigmailLocale.getString("msgCompose.protectSubject.question"),
EnigmailLocale.getString("msgCompose.protectSubject.yesButton"),
EnigmailLocale.getString("msgCompose.protectSubject.noButton"));
EnigmailPrefs.setPref("protectedHeaders", enableProtection ? 2 : 0);
this.protectHeaders = enableProtection;
this.displayProtectHeadersStatus();
}
}
},
encryptInline: function(sendInfo) { encryptInline: function(sendInfo) {
// sign/encrypt message using inline-PGP // sign/encrypt message using inline-PGP
......
...@@ -168,8 +168,10 @@ msgCompose.toolbarTxt.noEncryption=This message will be unsigned and unencrypted ...@@ -168,8 +168,10 @@ msgCompose.toolbarTxt.noEncryption=This message will be unsigned and unencrypted
msgCompose.toolbarTxt.disabled=Enigmail is disabled for the selected identity msgCompose.toolbarTxt.disabled=Enigmail is disabled for the selected identity
msgCompose.protectSubject.tooltip=Protect the message subject msgCompose.protectSubject.tooltip=Protect the message subject
msgCompose.noSubjectProtection.tooltip=Do not protect the message subject msgCompose.noSubjectProtection.tooltip=Do not protect the message subject
msgCompose.encryptedSubjectStub=Encrypted Message msgCompose.encryptedSubjectStub=Encrypted Message
msgCompose.protectSubject.question=Enable Protection of Subject?\n\nRegular encrypted mails contain the unredacted subject.\nWe have established a standard to hide the original subject in the encrypted message\nand replace it with a dummy text, such that the subject is only visible after the email is decrypted.\n\nDo you want to protect the subject in encrypted messages?
msgCompose.protectSubject.yesButton=&Protect Subject
msgCompose.protectSubject.noButton=&Let subject unprotected
msgCompose.detailsButton.label=Details ... msgCompose.detailsButton.label=Details ...
msgCompose.detailsButton.accessKey=D msgCompose.detailsButton.accessKey=D
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment