From 65d2a774867226db9bbfdc3c1688a6a0bc284c71 Mon Sep 17 00:00:00 2001 From: "Piotr F. Mieszkowski" Date: Thu, 2 Jun 2022 19:43:27 +0200 Subject: [PATCH] Don't break Content-Type header with LF - part 2 --- gpg-mailgate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpg-mailgate.py b/gpg-mailgate.py index 0b35bbd..30b8337 100755 --- a/gpg-mailgate.py +++ b/gpg-mailgate.py @@ -219,7 +219,7 @@ def encrypt_all_payloads_mime( message, gpg_to_cmdline ): # This also modifies the boundary in the body of the message, ie it gets parsed. if 'Content-Type' in message: - message.replace_header('Content-Type', "multipart/encrypted; protocol=\"application/pgp-encrypted\";\nboundary=\"%s\"\n" % boundary) + message.replace_header('Content-Type', "multipart/encrypted; protocol=\"application/pgp-encrypted\"; boundary=\"%s\"\n" % boundary) else: message['Content-Type'] = "multipart/encrypted; protocol=\"application/pgp-encrypted\"; boundary=\"%s\"\n" % boundary