Commit 5938244f authored by anonym's avatar anonym
Browse files

Merge branch 'bugfix/18034-ftbfs-thunderbird-patch' into 'stable'

Update Thunderbird patch series to apply on top of 78.5.0

Closes #18034

See merge request tails/tails!264
parents b02eef89 f74e26e9
......@@ -16,7 +16,9 @@ tmpdir="$(mktemp -d)"
# due to the weird omni.ja format, 7z will exit with non-zero code,
# that we need to override
7z x -tzip "$OMNI_JA" || true
for patch in $(cat "$PATCHES_DIRECTORY"/series) ; do
while read -r patch ; do # < "$PATCHES_DIRECTORY"/series
echo "I: Applying $patch"
# shellcheck disable=SC2002
cat "$PATCHES_DIRECTORY/$patch" \
| perl -p -E 's{^(--- [ab])/comm/mail/components/accountcreation/content/}{$1/chrome/messenger/content/messenger/accountcreation/}' \
| perl -p -E 's{^(--- [ab])/comm/mail/components/compose/content/}{$1/chrome/messenger/content/messenger/messengercompose/}' \
......@@ -25,10 +27,10 @@ tmpdir="$(mktemp -d)"
| perl -p -E 's{^(--- [ab])/comm/mailnews/mime/}{$1/modules/}' \
| perl -p -E 's{^(--- [ab])/comm/mailnews/}{$1/defaults/pref/}' \
| patch -p1
done
find . -name *.js -exec touch --date="@$SOURCE_DATE_EPOCH" '{}' \;
done < "$PATCHES_DIRECTORY"/series
find . -name '*.js' -exec touch --date="@$SOURCE_DATE_EPOCH" '{}' \;
rm "$OMNI_JA"
7z a -mtc=off -tzip "$OMNI_JA" *
7z a -mtc=off -tzip "$OMNI_JA" ./*
)
rm -r "${tmpdir}"
# HG changeset patch
# User Kai Engert <kaie@kuix.de>
# Date 1604310708 -3600
# Node ID 144bc9147e436c931076abbf75be729f172f77d5
# Parent d69c10af148210414d7849cb543c0ad5aa5d754e
Bug 1654950 - If a signed OpenPGP message automatically includes the public key should be configurable. r=PatrickBrunschwig a=wsmwk
diff --git a/comm/mail/components/compose/content/MsgComposeCommands.js b/comm/mail/components/compose/content/MsgComposeCommands.js
--- a/comm/mail/components/compose/content/MsgComposeCommands.js
+++ b/comm/mail/components/compose/content/MsgComposeCommands.js
@@ -1681,17 +1681,17 @@ function isPgpConfigured() {
}
function toggleGlobalSignMessage() {
gSendSigned = !gSendSigned;
gUserTouchedSendSigned = true;
if (!gUserTouchedAttachMyPubKey) {
if (gSendSigned) {
- gAttachMyPublicPGPKey = true;
+ gAttachMyPublicPGPKey = gCurrentIdentity.getBoolAttribute("attachPgpKey");
} else {
gAttachMyPublicPGPKey = gAttachMyPublicPGPKeyInitial;
}
}
setEncSigStatusUI();
}
@@ -1729,17 +1729,17 @@ function setGlobalEncryptMessage(mode) {
gSendSigned = true;
} else {
gSendSigned = gSendSignedInitial;
}
}
if (!gUserTouchedAttachMyPubKey) {
if (gSendSigned) {
- gAttachMyPublicPGPKey = true;
+ gAttachMyPublicPGPKey = gCurrentIdentity.getBoolAttribute("attachPgpKey");
} else {
gAttachMyPublicPGPKey = gAttachMyPublicPGPKeyInitial;
}
}
setEncSigStatusUI();
}
@@ -3802,17 +3802,17 @@ function adjustSignEncryptAfterIdentityC
}
gSendEncryptedInitial = gSendEncrypted;
gSendSignedInitial = gSendSigned;
gAttachMyPublicPGPKeyInitial = gAttachMyPublicPGPKey;
// automatic changes after this line
if (gSendSigned && gSelectedTechnologyIsPGP) {
- gAttachMyPublicPGPKey = true;
+ gAttachMyPublicPGPKey = gCurrentIdentity.getBoolAttribute("attachPgpKey");
}
} else {
// When switching the Sender identity, use the more secure setting
// for encryption and signing, respectively.
// For encryption, the more secure setting is "enabled".
// If the user has had encryption enabled for a message initially,
# HG changeset patch
# User Kai Engert <kaie@kuix.de>
# Date 1604501649 -3600
# Node ID 264083e4186898410df5b1454668df2054a7290a
# Parent 9484591b8ae3db9665d3f0e8db6e9b528a7b2cf6
Bug 1675285 - OpenPGP: Composer key status should list undecided/rejected keys. r=PatrickBrunschwig a=wsmwk
Differential Revision: https://phabricator.services.mozilla.com/D95859
diff --git a/comm/mail/extensions/openpgp/content/modules/keyRing.jsm b/comm/mail/extensions/openpgp/content/modules/keyRing.jsm
--- a/comm/mail/extensions/openpgp/content/modules/keyRing.jsm
+++ b/comm/mail/extensions/openpgp/content/modules/keyRing.jsm
@@ -997,35 +997,16 @@ var EnigmailKeyRing = {
if (!uidMatch) {
return -2;
}
// key valid for encryption?
if (!keyObj.keyUseFor.includes("E")) {
return -2;
}
- let acceptanceLevel;
- if (keyObj.secretAvailable) {
- let isPersonal = await PgpSqliteDb2.isAcceptedAsPersonalKey(keyObj.fpr);
- if (isPersonal) {
- acceptanceLevel = 3;
- } else {
- acceptanceLevel = -1; // rejected
- }
- } else {
- acceptanceLevel = await this.getKeyAcceptanceLevelForEmail(
- keyObj,
- emailAddr
- );
- }
-
- if (acceptanceLevel < 1) {
- return acceptanceLevel;
- }
-
// Ensure we have at least one key usable for encryption
// that is not expired/revoked.
// We already checked above, the primary key is not revoked/expired
let foundGoodEnc = keyObj.keyUseFor.match(/e/);
if (!foundGoodEnc) {
for (let aSub of keyObj.subKeys) {
switch (aSub.keyTrust) {
@@ -1039,16 +1020,31 @@ var EnigmailKeyRing = {
}
}
}
if (!foundGoodEnc) {
return -2;
}
+ let acceptanceLevel;
+ if (keyObj.secretAvailable) {
+ let isPersonal = await PgpSqliteDb2.isAcceptedAsPersonalKey(keyObj.fpr);
+ if (isPersonal) {
+ acceptanceLevel = 3;
+ } else {
+ acceptanceLevel = -1; // rejected
+ }
+ } else {
+ acceptanceLevel = await this.getKeyAcceptanceLevelForEmail(
+ keyObj,
+ emailAddr
+ );
+ }
+
return acceptanceLevel;
},
/**
* try to find valid key for encryption to passed email address
*
* @param details if not null returns error in details.msg
*
@@ -1276,17 +1272,17 @@ var EnigmailKeyRing = {
let k = this.getAllKeys(null, null);
let keyList = k.keyList;
for (let keyObj of keyList) {
let acceptanceLevel = await this.isValidKeyForRecipient(
keyObj,
emailAddr
);
- if (acceptanceLevel < 1) {
+ if (acceptanceLevel < -1) {
continue;
}
if (!keyObj.secretAvailable) {
keyObj.acceptance = this.getAcceptanceStringFromAcceptanceLevel(
acceptanceLevel
);
}
found.push(keyObj);
......@@ -2,5 +2,3 @@ Prefer-fetched-configurations-using-SSL-over-plainte.patch
Add-pref-for-whether-we-accept-OAuth2-during-autocon.patch
Fix-buggy-pref-for-disabling-MS-Exchange-autoconfig-.patch
Don-t-reset-encryption-choice-when-disabling-encrypt.patch
OpenPGP_Composer_key_status_should_list_undecided_re.patch
If_a_signed_OpenPGP_message_automatically_includes_t.patch
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