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 --- src/compose.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/compose.c') 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