From 06abbc0edda0eb79ba3afd28ff7f8e9ec366dee5 Mon Sep 17 00:00:00 2001 From: "Piotr F. Mieszkowski" Date: Thu, 2 Jun 2022 19:37:06 +0200 Subject: [PATCH] Don't break Content-Type header with LF --- gpg-mailgate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpg-mailgate.py b/gpg-mailgate.py index 879a27a..0b35bbd 100755 --- a/gpg-mailgate.py +++ b/gpg-mailgate.py @@ -221,7 +221,7 @@ def encrypt_all_payloads_mime( message, gpg_to_cmdline ): if 'Content-Type' in message: message.replace_header('Content-Type', "multipart/encrypted; protocol=\"application/pgp-encrypted\";\nboundary=\"%s\"\n" % boundary) else: - message['Content-Type'] = "multipart/encrypted; protocol=\"application/pgp-encrypted\";\nboundary=\"%s\"\n" % boundary + message['Content-Type'] = "multipart/encrypted; protocol=\"application/pgp-encrypted\"; boundary=\"%s\"\n" % boundary return [ pgp_ver_part, encrypt_payload(encrypted_part, gpg_to_cmdline, check_nested) ]