Merge pull request #4720 from basilgello/pgp-signonly-ignore-encrypt-subject

Do not encrypt message subject if message body is not encrypted
This commit is contained in:
cketti 2020-05-03 20:39:48 +02:00 committed by GitHub
commit 496dac7f68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -170,7 +170,7 @@ public class PgpMessageBuilder extends MessageBuilder {
boolean payloadSupportsMimeHeaders = !isPgpInlineMode;
if (payloadSupportsMimeHeaders) {
if (cryptoStatus.isEncryptSubject()) {
if (cryptoStatus.isEncryptSubject() && shouldEncrypt) {
moveSubjectIntoEncryptedPayload();
}
maybeAddGossipHeadersToBodyPart();