From e95d099cdfd41ffc155a6c84bec38eade749ffbd Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 19 Sep 2006 02:19:32 +0000 Subject: check Bcc recipients before encryption. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1167 ee746299-78ed-0310-b773-934348b2243d --- ChangeLog | 5 +++++ ChangeLog.ja | 5 +++++ NEWS | 2 ++ src/compose.c | 23 +++++++++++++++++++++++ 4 files changed, 35 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9fdb2f9b..52166571 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-09-19 + + * src/compose.c: compose_write_to_file(): check Bcc recipients before + encryption. + 2006-09-14 * libsylph/pop.c: pop3_write_uidl_list(): use PrefFile to protect diff --git a/ChangeLog.ja b/ChangeLog.ja index 0521f76c..aa056da6 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,8 @@ +2006-09-19 + + * src/compose.c: compose_write_to_file(): 暗号化の前に Bcc の宛先を + チェックするようにした。 + 2006-09-14 * libsylph/pop.c: pop3_write_uidl_list(): ディスクが一杯のときに diff --git a/NEWS b/NEWS index 1b7b2d7c..c4730855 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ Changes of Sylpheed * UTF-8 text can be inserted correctly in the compose window. * The error messages of the failure of displaying message body was improved. + * A warning is displayed before sending when Bcc is specified on + encryption. * Minor UI fixes were made. * Other minor bugs were fixed. * Win32: Regular expression was supported in filtering. diff --git a/src/compose.c b/src/compose.c index 7c4d8210..a3ca459e 100644 --- a/src/compose.c +++ b/src/compose.c @@ -3136,6 +3136,29 @@ static gint compose_write_to_file(Compose *compose, const gchar *file, } } if (compose->use_encryption) { + if (compose->use_bcc) { + const gchar *text; + gchar *bcc; + AlertValue aval; + + text = gtk_entry_get_text + (GTK_ENTRY(compose->bcc_entry)); + Xstrdup_a(bcc, text, { g_unlink(file); return -1; }); + g_strstrip(bcc); + if (*bcc != '\0') { + aval = alertpanel_full + (_("Encrypting with Bcc"), + _("This message has Bcc recipients. If this message is encrypted, all Bcc recipients will be visible by examing the encryption key list, leading to loss of confidentiality.\n" + "\n" + "Send it anyway?"), + ALERT_WARNING, G_ALERTDEFAULT, FALSE, + GTK_STOCK_YES, GTK_STOCK_NO, NULL); + if (aval != G_ALERTDEFAULT) { + g_unlink(file); + return -1; + } + } + } if (rfc2015_encrypt(file, compose->to_list, compose->account->ascii_armored) < 0) { g_unlink(file); -- cgit v1.2.3