]> granicus.if.org Git - mutt/commitdiff
Add warning about using inline pgp with format=flowed. (closes #3963)
authorKevin McCarthy <kevin@8t8.us>
Mon, 4 Sep 2017 20:26:55 +0000 (13:26 -0700)
committerKevin McCarthy <kevin@8t8.us>
Mon, 4 Sep 2017 20:26:55 +0000 (13:26 -0700)
The reporter noted that when trying to use inline signing with
format=flowed, the flowed was turned off.

After some research, this appears to be deliberate, probably because
of strange interactions between inline PGP and format=flowed.  In fact
the RFC strongly discourages their combined use:
https://tools.ietf.org/html/rfc3676#section-4.6

Add a warning and prompt to use PGP/MIME in mutt_protect().

crypt.c

diff --git a/crypt.c b/crypt.c
index 5804c1483f2890f0bea9c069edc552b939f244b5..19a585d06544bf6582d9fb9f8013a69e64fe69dd 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -153,6 +153,16 @@ int mutt_protect (HEADER *msg, char *keylist)
         return -1;
       }
     }
+    else if (!mutt_strcasecmp ("flowed",
+                               mutt_get_parameter ("format", msg->content->parameter)))
+    {
+      if ((i = query_quadoption (OPT_PGPMIMEAUTO,
+              _("Inline PGP can't be used with format=flowed.  Revert to PGP/MIME?"))) != MUTT_YES)
+      {
+        mutt_error _("Mail not sent: inline PGP can't be used with format=flowed.");
+        return -1;
+      }
+    }
     else
     {
       /* they really want to send it inline... go for it */