From de43d6902d53d17d740d57891f6e9efbdf4106f0 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Fri, 1 Jul 2016 13:33:20 -0700 Subject: [PATCH] Check $pgp_autoinline and $pgp_replyinline if oppenc is set. (closes #3846) The first oppenc call takes place after the initial checks of $pgp_autoline and $pgp_replyinline, and doesn't go through the pgp menu. Therefore, check for $pgp_autoline and $pgp_replyinline if oppenc is set too, to avoid oppenc enabling encryption without INLINE being set in those cases. a6a4d6ed0f19 previously cleaned things up so that it is safe to set INLINE even if encryption isn't enabled. --- send.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/send.c b/send.c index 387de5db..8b71ea57 100644 --- a/send.c +++ b/send.c @@ -1507,7 +1507,8 @@ ci_send_message (int flags, /* send mode */ msg->security |= SIGN; if (option (OPTCRYPTREPLYSIGNENCRYPTED) && cur && (cur->security & ENCRYPT)) msg->security |= SIGN; - if (WithCrypto & APPLICATION_PGP && (msg->security & (ENCRYPT | SIGN))) + if ((WithCrypto & APPLICATION_PGP) && + ((msg->security & (ENCRYPT | SIGN)) || option (OPTCRYPTOPPORTUNISTICENCRYPT))) { if (option (OPTPGPAUTOINLINE)) msg->security |= INLINE; -- 2.40.0