[arch-commits] Commit in thunderbird/trunk (2 files)
Levente Polyak
anthraxx at archlinux.org
Wed Nov 18 18:51:24 UTC 2020
Date: Wednesday, November 18, 2020 @ 18:51:23
Author: anthraxx
Revision: 401350
upgpkg: thunderbird 78.4.3-1
Added:
thunderbird/trunk/thunderbird-78.4.3-gpgme-double-armored-fix.patch
Modified:
thunderbird/trunk/PKGBUILD
---------------------------------------------------+
PKGBUILD | 10 +--
thunderbird-78.4.3-gpgme-double-armored-fix.patch | 62 ++++++++++++++++++++
2 files changed, 68 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-11-18 18:45:30 UTC (rev 401349)
+++ PKGBUILD 2020-11-18 18:51:23 UTC (rev 401350)
@@ -6,7 +6,7 @@
# Contributor: Anders Bostrom <anders.bostrom at home.se>
pkgname=thunderbird
-pkgver=78.4.1
+pkgver=78.4.3
pkgrel=1
pkgdesc='Standalone mail and news reader from mozilla.org'
url='https://www.mozilla.org/thunderbird/'
@@ -33,8 +33,9 @@
distribution.ini
mozconfig.cfg
configure-fix-passing-system-bzip2-ldflags.patch
- thunderbird-rust-1.47.patch::https://src.fedoraproject.org/rpms/thunderbird/raw/86967ddc206310ba7bb9eb57a933031909288ce2/f/rust-1.47.patch)
-sha512sums=('dd2aea61d172e5e6b6bebf1aeaa9fbafe38749bc435b791472d13e430446286fcd20e03c12e8f9acd6c74d4af0e7db1e50e08b2ff5cfdbdbae6462eb6984b5aa'
+ thunderbird-rust-1.47.patch::https://src.fedoraproject.org/rpms/thunderbird/raw/86967ddc206310ba7bb9eb57a933031909288ce2/f/rust-1.47.patch
+ thunderbird-78.4.3-gpgme-double-armored-fix.patch)
+sha512sums=('0c441f5a55301f4d012caff111d6a882205048e4adf301ff3cfa553e1665e47a1fd835a926bd97c61e543a79465c5ada73ae699fc56425dec3dbc40f17b75620'
'SKIP'
'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012'
'6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734'
@@ -41,7 +42,8 @@
'5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f'
'b04e8b11360f41e0cc0eb0c307f062569603372ed15112e33a0ca893c5622217c3155289b3560c0ba909306faf25ff98b7dc3944ad1493e0a8d940306be5167a'
'e3ed2708b8354015cb3d2c81048d1ce4932d1effbe2b40efa7cf9b45c1b923b9fd708645e2f8aa0136a485a3f7ce6b396b85721aaf535a4a764fd5005fb7e222'
- 'd337a77104d411df219f3ae1c7d136ae92f944a18969cc92e6257b4f909204677a58df43187d41f53d4c36c29f57f53bdbad90d8263e6a9b0781640944895cad')
+ 'd337a77104d411df219f3ae1c7d136ae92f944a18969cc92e6257b4f909204677a58df43187d41f53d4c36c29f57f53bdbad90d8263e6a9b0781640944895cad'
+ '92f4c5946f288b30728382830b99b91980ecd845d1606ab251bbdde5cf53387e966727a23f35a3bf7756ee77e72e478f3fb468668e8c412f552547eeb3408299')
validpgpkeys=(14F26682D0916CDD81E37B6D61B7B526D98F0353) # Mozilla Software Releases <release at mozilla.com>
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
Added: thunderbird-78.4.3-gpgme-double-armored-fix.patch
===================================================================
--- thunderbird-78.4.3-gpgme-double-armored-fix.patch (rev 0)
+++ thunderbird-78.4.3-gpgme-double-armored-fix.patch 2020-11-18 18:51:23 UTC (rev 401350)
@@ -0,0 +1,62 @@
+# HG changeset patch
+# User Kai Engert <kaie at kuix.de>
+# Date 1605644505 -3600
+# Tue Nov 17 21:21:45 2020 +0100
+# Node ID 8eee96dfe5184bfe9b78abb473fb5b66d408d537
+# Parent 997190de89d38dccdb6de5b1e585c2f997d6d6c8
+Bug 1675939 - Detect if output from GPGME.gpgme_op_decrypt_ext is armored. r=PatrickBrunschwig
+
+diff --git a/comm/mail/extensions/openpgp/content/modules/GPGME.jsm b/comm/mail/extensions/openpgp/content/modules/GPGME.jsm
+--- a/comm/mail/extensions/openpgp/content/modules/GPGME.jsm
++++ b/comm/mail/extensions/openpgp/content/modules/GPGME.jsm
+@@ -74,6 +74,8 @@ var GPGME = {
+ throw new Error("gpgme_new failed");
+ }
+
++ GPGMELib.gpgme_set_armor(c1, 1);
++
+ result.exitCode = GPGMELib.gpgme_op_decrypt_ext(
+ c1,
+ GPGMELib.GPGME_DECRYPT_UNWRAP,
+@@ -98,14 +100,35 @@ var GPGME = {
+ ).contents;
+
+ // The result of decrypt(GPGME_DECRYPT_UNWRAP) is an OpenPGP message.
+- // However, GPGME always returns the results as a binary encoding.
+- // GPG 1.12.0 ignored gpgme_set_armor(context, 1) and
+- // gpgme_data_set_encoding(data_plain, GPGME_DATA_ENCODING_ARMOR).
++ // Because old versions of GPGME (e.g. 1.12.0) may return the
++ // results as a binary encoding (despite gpgme_set_armor),
++ // we check if the result looks like an armored message.
++ // If it doesn't we apply armoring ourselves.
++
++ let armor_head = "-----BEGIN PGP MESSAGE-----";
++
++ let head_of_array = ctypes.cast(
++ result_buf,
++ ctypes.char.array(armor_head.length).ptr
++ ).contents;
++
++ let isArmored = false;
+
+- // TODO: Find a way to pass the binary data directly to the
+- // RNP.decrypt function for efficiency.
++ try {
++ // If this is binary, which usually isn't a valid UTF-8
++ // encoding, it will throw an error.
++ let head_of_array_string = head_of_array.readString();
++ if (head_of_array_string == armor_head) {
++ isArmored = true;
++ }
++ } catch (ex) {}
+
+- result.decryptedData = enArmorCB(unwrapped, result_len.value);
++ if (isArmored) {
++ result.decryptedData = unwrapped.readString();
++ } else {
++ result.decryptedData = enArmorCB(unwrapped, result_len.value);
++ }
++
+ GPGMELib.gpgme_free(result_buf);
+ }
+
More information about the arch-commits
mailing list