[evolution] Trust attachments from ~/.kde and ~/.kde4.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Trust attachments from ~/.kde and ~/.kde4.
- Date: Mon, 2 Jul 2012 15:03:16 +0000 (UTC)
commit ae1f880dd8b49003a8c0ec51e977bad5bc6d5329
Author: Matthew Barnes <mbarnes redhat com>
Date: Mon Jul 2 10:45:58 2012 -0400
Trust attachments from ~/.kde and ~/.kde4.
This came about from a mailing list thread entitled:
Sending photos from digKam: "Skipping suspicious attachment"
Apparently KDE still uses dot-folders quite heavily, despite having
helped draft the XDG Base Directory Specification.
composer/e-msg-composer.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 82f2ef5..168a843 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -3929,6 +3929,8 @@ file_is_blacklisted (const gchar *argument)
}
if (blacklisted) {
+ gchar *base_dir;
+
/* Don't blacklist files in trusted base directories. */
if (g_str_has_prefix (filename, g_get_user_data_dir ()))
blacklisted = FALSE;
@@ -3936,6 +3938,20 @@ file_is_blacklisted (const gchar *argument)
blacklisted = FALSE;
if (g_str_has_prefix (filename, g_get_user_config_dir ()))
blacklisted = FALSE;
+
+ /* Apparently KDE still uses ~/.kde heavily, and some
+ * distributions use ~/.kde4 to distinguish KDE4 data
+ * from KDE3 data. Trust these directories as well. */
+
+ base_dir = g_build_filename (g_get_home_dir (), ".kde", NULL);
+ if (g_str_has_prefix (filename, base_dir))
+ blacklisted = FALSE;
+ g_free (base_dir);
+
+ base_dir = g_build_filename (g_get_home_dir (), ".kde4", NULL);
+ if (g_str_has_prefix (filename, base_dir))
+ blacklisted = FALSE;
+ g_free (base_dir);
}
g_strfreev (parts);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]