diff options
author | Vibha Yadav <yvibha@novell.com> | 2011-09-15 20:48:12 +0800 |
---|---|---|
committer | Vibha Yadav <yvibha@novell.com> | 2011-09-15 20:48:12 +0800 |
commit | 5817e1ffb9bbe8449cc1881e2887f1a615cbea69 (patch) | |
tree | 7e8ad9d615c9e3edb6f17c7f1812bec0af2d7d5a | |
parent | 1544ad3a69ff1f19993eb7081f2ed09f9d12fc3a (diff) | |
download | gsoc2013-evolution-5817e1ffb9bbe8449cc1881e2887f1a615cbea69.tar gsoc2013-evolution-5817e1ffb9bbe8449cc1881e2887f1a615cbea69.tar.gz gsoc2013-evolution-5817e1ffb9bbe8449cc1881e2887f1a615cbea69.tar.bz2 gsoc2013-evolution-5817e1ffb9bbe8449cc1881e2887f1a615cbea69.tar.lz gsoc2013-evolution-5817e1ffb9bbe8449cc1881e2887f1a615cbea69.tar.xz gsoc2013-evolution-5817e1ffb9bbe8449cc1881e2887f1a615cbea69.tar.zst gsoc2013-evolution-5817e1ffb9bbe8449cc1881e2887f1a615cbea69.zip |
Reverting the previous commit.
-rw-r--r-- | composer/e-msg-composer.c | 30 | ||||
-rw-r--r-- | mail/mail.error.xml | 5 |
2 files changed, 0 insertions, 35 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 0eaf3caa6b..c41c4019b3 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -128,8 +128,6 @@ static void handle_multipart_signed (EMsgComposer *composer, static void e_msg_composer_alert_sink_init (EAlertSinkInterface *interface); -gboolean check_blacklisted_file (gchar *filename); - G_DEFINE_TYPE_WITH_CODE ( EMsgComposer, e_msg_composer, @@ -4005,28 +4003,6 @@ merge_always_cc_and_bcc (EComposerHeaderTable *table, e_destination_freev (addrv); } -static const gchar *blacklisted_files [] = {".", "etc", ".."}; - -gboolean check_blacklisted_file (gchar *filename) -{ - gboolean blacklisted = FALSE; - gint i,j,len; - gchar **filename_part; - - filename_part = g_strsplit (filename, G_DIR_SEPARATOR_S, -1); - len = g_strv_length(filename_part); - for(i = 0; !blacklisted && i < G_N_ELEMENTS(blacklisted_files); i++) - { - for (j = 0; !blacklisted && j < len;j++) - if (g_str_has_prefix (filename_part[j], blacklisted_files[i])) - blacklisted = TRUE; - } - - g_strfreev(filename_part); - - return blacklisted; -} - static void handle_mailto (EMsgComposer *composer, const gchar *mailto) @@ -4118,14 +4094,8 @@ handle_mailto (EMsgComposer *composer, } else if (!g_ascii_strcasecmp (header, "attach") || !g_ascii_strcasecmp (header, "attachment")) { EAttachment *attachment; - gboolean check = FALSE; camel_url_decode (content); - check = check_blacklisted_file(content); - if(check) - e_alert_submit ( - E_ALERT_SINK (composer), - "mail:blacklisted-file", content, NULL); if (g_ascii_strncasecmp (content, "file:", 5) == 0) attachment = e_attachment_new_for_uri (content); else diff --git a/mail/mail.error.xml b/mail/mail.error.xml index 006cc559a4..f32b4ce688 100644 --- a/mail/mail.error.xml +++ b/mail/mail.error.xml @@ -540,10 +540,5 @@ An mbox account will be created to preserve the old mbox folders. You can delete <_secondary>The reported error was "{0}".</_secondary> </error> - <error id="blacklisted-file" type="warning"> - <_primary>Hidden file is attached.</_primary> - <_secondary xml:space="preserve">The attachment named {0} is a hidden file and may contain sensitive data. Please review it before sending.</_secondary> - </error> - </error-list> |