|
|
@ -120,8 +120,8 @@ var pEpComposer = { |
|
|
|
|
|
|
|
// We are here for the first time, so let's see whether we should encrypt.
|
|
|
|
// We always encrypt if the original was private, see P4TB-75.
|
|
|
|
this.shouldEncrypt = TbHelper.encryptForIdentity(currentIdentity) |
|
|
|
|| this.isOriginallyEncrypted; |
|
|
|
this.shouldEncrypt = TbHelper.encryptForIdentity(currentIdentity) || |
|
|
|
this.isOriginallyEncrypted; |
|
|
|
|
|
|
|
// The user can also disable protection, even though they should encrypt.
|
|
|
|
// When the window comes up for the first time, nothing is disabled yet.
|
|
|
@ -306,16 +306,16 @@ var pEpComposer = { |
|
|
|
const msgcomposeWindow = document.getElementById("msgcomposeWindow"); |
|
|
|
const sendMsgType = msgcomposeWindow.getAttribute("msgtype"); |
|
|
|
|
|
|
|
if (sendMsgType == Ci.nsIMsgCompDeliverMode.SaveAsDraft |
|
|
|
|| sendMsgType == Ci.nsIMsgCompDeliverMode.SaveAsTemplate |
|
|
|
|| sendMsgType == Ci.nsIMsgCompDeliverMode.AutoSaveAsDraft) { |
|
|
|
if (sendMsgType == Ci.nsIMsgCompDeliverMode.SaveAsDraft || |
|
|
|
sendMsgType == Ci.nsIMsgCompDeliverMode.SaveAsTemplate || |
|
|
|
sendMsgType == Ci.nsIMsgCompDeliverMode.AutoSaveAsDraft) { |
|
|
|
// Check whether the account of the identity requires secure storage.
|
|
|
|
isDraftOrTemplate = true; |
|
|
|
if (!TbHelper.encryptDraftOrTemplateForIdentity(TbAbstraction.getCurrentIdentity(), sendMsgType)) return; |
|
|
|
} |
|
|
|
|
|
|
|
if (Services.prefs.getBoolPref("extensions.pEp.warnUnencrypted", true) |
|
|
|
&& (this.isOriginallyEncrypted && !isPrivate(this.rating))) { |
|
|
|
if (Services.prefs.getBoolPref("extensions.pEp.warnUnencrypted", true) && |
|
|
|
(this.isOriginallyEncrypted && !isPrivate(this.rating))) { |
|
|
|
// If user confirmed unsecure sending, there's nothing we need to do.
|
|
|
|
if (this.confirmSendUnsecure()) return; |
|
|
|
|
|
|
@ -358,8 +358,8 @@ var pEpComposer = { |
|
|
|
|
|
|
|
confirmSendUnsecure() { |
|
|
|
// Open dialog and ask the user to send mail unencrypted.
|
|
|
|
const flags = Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0 |
|
|
|
+ Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_1; |
|
|
|
const flags = Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0 + |
|
|
|
Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_1; |
|
|
|
return (Services.prompt.confirmEx( |
|
|
|
window, |
|
|
|
"Privacy Reminder", // L10N
|
|
|
|