]> granicus.if.org Git - neomutt/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)
committerRichard Russon <rich@flatcap.org>
Tue, 5 Sep 2017 23:57:33 +0000 (00:57 +0100)
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().

ncrypt/crypt.c

index bd9918f8350d2cefa50a6f835061963fc94d8f70..fefcbc0d443e74d10a5a890c4bba09d4b9c899c8 100644 (file)
@@ -160,6 +160,16 @@ int mutt_protect(struct Header *msg, char *keylist)
         return -1;
       }
     }
+    else if (!mutt_strcasecmp ("flowed",
+                               mutt_get_parameter ("format", msg->content->parameter)))
+    {
+      if ((query_quadoption (OPT_PGP_MIME_AUTO,
+              _("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 */