[Patch] fix confusing warning sending RFC 4880 encrypted messages
Albrecht Dreß <[email protected]>
| Newsgroups | gmane.comp.gnome.apps.balsa |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I noticed that when sending a RFC 4880 (old OpenPGP mode) encrypted message, the warning “This message will not be encrypted for the BCC: recipients” pops up, even if no Bcc: recipients have been specified. This is apparently caused by a missing check for an empty bcc recipients list. The attached trivial patch fixes it, and also fixes the singular/plural form of the warning for the (modern) multipart/encrypted formats. Opinions? Cheers, Albrecht. --- Patch details: - libbalsa/send.c: fix confusing bcc: encryption warning in libbalsa_create_rfc2440_buffer() if no bcc: recipients are present; use singular/plural form of this warning in do_multipart_crypto() _______________________________________________ balsa-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/balsa-list
fix_bcc_encryption_warning.diff
(text/x-patch, 1.6 KB)
diff --git a/libbalsa/send.c b/libbalsa/send.c
index 51908f578..a68f1b079 100644
--- a/libbalsa/send.c
+++ b/libbalsa/send.c
@@ -1822,7 +1822,8 @@ libbalsa_create_rfc2440_buffer(LibBalsaMessage *message,
message->headers->cc_list);
encrypt_for = get_mailbox_names(encrypt_for,
message->headers->from);
- if (message->headers->bcc_list != NULL) {
+ if ((message->headers->bcc_list != NULL) &&
+ (internet_address_list_length(message->headers->bcc_list) > 0)) {
libbalsa_information
(LIBBALSA_INFORMATION_WARNING,
ngettext("This message will not be encrypted "
@@ -1918,9 +1919,14 @@ do_multipart_crypto(LibBalsaMessage *message,
if (message->headers->bcc_list
&& (internet_address_list_length(message->headers->
bcc_list) > 0)) {
- libbalsa_information(LIBBALSA_INFORMATION_WARNING,
- _(
- "This message will not be encrypted for the BCC: recipient(s)."));
+ libbalsa_information
+ (LIBBALSA_INFORMATION_WARNING,
+ ngettext("This message will not be encrypted "
+ "for the BCC: recipient.",
+ "This message will not be encrypted "
+ "for the BCC: recipients.",
+ internet_address_list_length
+ (message->headers->bcc_list)));
}
if (message->gpg_mode & LIBBALSA_PROTECT_SIGN) {
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEcCEPemLFTtyGf4zATKlvDmfn2fgFAlx4QJQACgkQTKlvDmfn 2figNgf8DP9X4fiAOD4aqBzOz3iMhidZwMCMjR3SPm7r9M2aiSYS8LnwOiksMZ1w bscFnwjV7EMXwJtJsKAWW64M96B5mG28d+ntn6HHOwm1wi7dkg93oZvB47B61nZ8 XXmWNbE9OjDwssoSUxh9EiLkN6y1I83tRDtZCjNhtc8PYBUZExLG47kDfzVHRmXY xr++Lnf0pAjL6MI+otBpLw6NBKF2M2Uforej9FB5Hu53IBfdIo1uPEQkgZ2xbrPp NwetlGgJ72IuuDBfn/a2F0dw7Cl9UFbx26R+TlJskKEvj37oIcbeM5dbK00drpus +cYplp99Velb8pHEfEEUFvQyy04M9Q== =59RQ -----END PGP SIGNATURE-----