aboutsummaryrefslogtreecommitdiff
path: root/src/compose.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-09-19 02:19:32 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-09-19 02:19:32 +0000
commite95d099cdfd41ffc155a6c84bec38eade749ffbd (patch)
treecfd1b57c4f0cad26762eb6526efb695d240d7f2b /src/compose.c
parent39107c8161a25feebadc1cb9a86b9631f5be6eb1 (diff)
check Bcc recipients before encryption.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1167 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/compose.c')
-rw-r--r--src/compose.c23
1 files changed, 23 insertions, 0 deletions
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);