From paul at claws-mail.org Wed Jun 3 15:22:08 2020 From: paul at claws-mail.org (paul at claws-mail.org) Date: Wed, 3 Jun 2020 15:22:08 +0200 (CEST) Subject: [Commits] [SCM] claws branch, master, updated. 3.17.5-22-gabfab6860 Message-ID: <20200603132208.CC15F401E9@claws-mail.org> The branch, master has been updated via abfab6860f3edb8b3d7526804c2373db11fe3f6b (commit) from cf7ccc9dc9c1861a6a24318280bd2560cbdc2313 (commit) Summary of changes: src/textview.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) - Log ----------------------------------------------------------------- commit abfab6860f3edb8b3d7526804c2373db11fe3f6b Author: Paul Date: Wed Jun 3 14:22:03 2020 +0100 add Phishing warning when copying url closes RFE 4348 'display the phishing pop on "copy this libnk"' and ends continual badgering diff --git a/src/textview.c b/src/textview.c index ea20c125d..a76d88e2e 100644 --- a/src/textview.c +++ b/src/textview.c @@ -1,6 +1,6 @@ /* * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2016 Hiroyuki Yamamoto and the Claws Mail team + * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2976,16 +2976,16 @@ static void copy_uri_cb (GtkAction *action, TextView *textview) const gchar *raw_url = g_object_get_data(G_OBJECT(textview->link_popup_menu), "raw_url"); if (uri) { - gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), uri->uri, -1); - gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), uri->uri, -1); - g_object_set_data(G_OBJECT(textview->link_popup_menu), "menu_button", - NULL); + if (textview_uri_security_check(textview, uri) == TRUE) { + gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), uri->uri, -1); + gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), uri->uri, -1); + g_object_set_data(G_OBJECT(textview->link_popup_menu), "menu_button", NULL); + } } if (raw_url) { gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), raw_url, -1); gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), raw_url, -1); - g_object_set_data(G_OBJECT(textview->link_popup_menu), "raw_url", - NULL); + g_object_set_data(G_OBJECT(textview->link_popup_menu), "raw_url", NULL); } } ----------------------------------------------------------------------- hooks/post-receive -- Claws Mail From paul at claws-mail.org Wed Jun 3 15:23:24 2020 From: paul at claws-mail.org (paul at claws-mail.org) Date: Wed, 3 Jun 2020 15:23:24 +0200 (CEST) Subject: [Commits] [SCM] claws branch, gtk3, updated. 3.16.0-966-g00e802e57 Message-ID: <20200603132325.72CFC4020A@claws-mail.org> The branch, gtk3 has been updated via 00e802e57c96faa3ebf6a8cfca7e4c4a2c680343 (commit) from 45616190adbd0ba15afd1abcb567eb37fbb25f3a (commit) Summary of changes: src/textview.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) - Log ----------------------------------------------------------------- commit 00e802e57c96faa3ebf6a8cfca7e4c4a2c680343 Author: Paul Date: Wed Jun 3 14:22:03 2020 +0100 add Phishing warning when copying url closes RFE 4348 'display the phishing pop on "copy this libnk"' and ends continual badgering diff --git a/src/textview.c b/src/textview.c index 3c4022ab0..90f26b026 100644 --- a/src/textview.c +++ b/src/textview.c @@ -2938,16 +2938,16 @@ static void copy_uri_cb (GtkAction *action, TextView *textview) const gchar *raw_url = g_object_get_data(G_OBJECT(textview->link_popup_menu), "raw_url"); if (uri) { - gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), uri->uri, -1); - gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), uri->uri, -1); - g_object_set_data(G_OBJECT(textview->link_popup_menu), "menu_button", - NULL); + if (textview_uri_security_check(textview, uri) == TRUE) { + gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), uri->uri, -1); + gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), uri->uri, -1); + g_object_set_data(G_OBJECT(textview->link_popup_menu), "menu_button", NULL); + } } if (raw_url) { gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), raw_url, -1); gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), raw_url, -1); - g_object_set_data(G_OBJECT(textview->link_popup_menu), "raw_url", - NULL); + g_object_set_data(G_OBJECT(textview->link_popup_menu), "raw_url", NULL); } } ----------------------------------------------------------------------- hooks/post-receive -- Claws Mail From mones at claws-mail.org Sun Jun 21 19:42:21 2020 From: mones at claws-mail.org (mones at claws-mail.org) Date: Sun, 21 Jun 2020 19:42:21 +0200 (CEST) Subject: [Commits] [SCM] claws branch, master, updated. 3.17.5-24-g4ed9411f4 Message-ID: <20200621174221.EC93F401C2@claws-mail.org> The branch, master has been updated via 4ed9411f4dc2801d7f983734ae4003102b8f361d (commit) via 3fdfe990c6976d2e5b41b27655dc3c4da5bccb94 (commit) from abfab6860f3edb8b3d7526804c2373db11fe3f6b (commit) Summary of changes: src/plugins/libravatar/libravatar_image.c | 12 +++++++++--- src/plugins/libravatar/libravatar_prefs.c | 9 +++++++++ src/plugins/libravatar/libravatar_prefs.h | 3 +++ 3 files changed, 21 insertions(+), 3 deletions(-) - Log ----------------------------------------------------------------- commit 4ed9411f4dc2801d7f983734ae4003102b8f361d Author: Ricardo Mones Date: Sun Jun 21 19:41:40 2020 +0200 Fix bug 4220 "generates files in cache without content" Also replace "safe" call, since file should not be locked and is going to be deleted anyway. diff --git a/src/plugins/libravatar/libravatar_image.c b/src/plugins/libravatar/libravatar_image.c index b5675aac2..6d0fdac76 100644 --- a/src/plugins/libravatar/libravatar_image.c +++ b/src/plugins/libravatar/libravatar_image.c @@ -83,6 +83,7 @@ static GdkPixbuf *pixbuf_from_url(const gchar *url, const gchar *md5, const gcha curl = curl_easy_init(); if (curl == NULL) { g_warning("could not initialize curl to get image from URL"); + unlink(filename); claws_fclose(file); return NULL; } @@ -113,7 +114,8 @@ static GdkPixbuf *pixbuf_from_url(const gchar *url, const gchar *md5, const gcha res = curl_easy_perform(curl); if (res != CURLE_OK) { debug_print("curl_easy_perfom failed: %s", curl_easy_strerror(res)); - claws_safe_fclose(file); + unlink(filename); + claws_fclose(file); } else { filesize = ftell(file); claws_safe_fclose(file); commit 3fdfe990c6976d2e5b41b27655dc3c4da5bccb94 Author: Ricardo Mones Date: Sun Jun 21 19:40:59 2020 +0200 Fix bug 4325 "Following redirects when retrieving image" Previously hardcoded numbers are now raised to cope with libravatar servers changes and also moved into 3 new hidden preferences for the plugin, for future customisation if required. diff --git a/src/plugins/libravatar/libravatar_image.c b/src/plugins/libravatar/libravatar_image.c index 057569a0f..b5675aac2 100644 --- a/src/plugins/libravatar/libravatar_image.c +++ b/src/plugins/libravatar/libravatar_image.c @@ -99,8 +99,12 @@ static GdkPixbuf *pixbuf_from_url(const gchar *url, const gchar *md5, const gcha curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); if (libravatarprefs.allow_redirects) { - long maxredirs = (libravatarprefs.default_mode == DEF_MODE_URL)? 3L - : ((libravatarprefs.default_mode == DEF_MODE_MM)? 2L: 1L); + long maxredirs = (libravatarprefs.default_mode == DEF_MODE_URL) + ? libravatarprefs.max_redirects_url + : ((libravatarprefs.default_mode == DEF_MODE_MM) + ? libravatarprefs.max_redirects_mm + : libravatarprefs.max_redirects_url); + debug_print("setting max redirects to %ld\n", maxredirs); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_MAXREDIRS, maxredirs); } diff --git a/src/plugins/libravatar/libravatar_prefs.c b/src/plugins/libravatar/libravatar_prefs.c index 3183def94..3a097001b 100644 --- a/src/plugins/libravatar/libravatar_prefs.c +++ b/src/plugins/libravatar/libravatar_prefs.c @@ -93,6 +93,15 @@ static PrefParam param[] = { { "timeout", "0", &libravatarprefs.timeout, P_INT, NULL, NULL, NULL }, + { "max_redirects_url", "7", + &libravatarprefs.max_redirects_url, + P_INT, NULL, NULL, NULL }, + { "max_redirects_mm", "5", + &libravatarprefs.max_redirects_mm, + P_INT, NULL, NULL, NULL }, + { "max_redirects", "3", + &libravatarprefs.max_redirects, + P_INT, NULL, NULL, NULL }, {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL} }; diff --git a/src/plugins/libravatar/libravatar_prefs.h b/src/plugins/libravatar/libravatar_prefs.h index 49be9645d..2e4cb93c3 100644 --- a/src/plugins/libravatar/libravatar_prefs.h +++ b/src/plugins/libravatar/libravatar_prefs.h @@ -48,6 +48,9 @@ struct _LibravatarPrefs gboolean allow_federated; #endif guint timeout; + guint max_redirects_url; /* hidden pref */ + guint max_redirects_mm; /* hidden pref */ + guint max_redirects; /* hidden pref */ }; extern LibravatarPrefs libravatarprefs; ----------------------------------------------------------------------- hooks/post-receive -- Claws Mail From mones at claws-mail.org Sun Jun 21 19:44:44 2020 From: mones at claws-mail.org (mones at claws-mail.org) Date: Sun, 21 Jun 2020 19:44:44 +0200 (CEST) Subject: [Commits] [SCM] claws branch, gtk3, updated. 3.16.0-968-gd42f3d7e5 Message-ID: <20200621174445.04D3A40158@claws-mail.org> The branch, gtk3 has been updated via d42f3d7e5f9e65d045be32a71c8a67e7de7a2591 (commit) via a0cd23ecbb4ea8b3bc76568b47e8e9451678a2cb (commit) from 00e802e57c96faa3ebf6a8cfca7e4c4a2c680343 (commit) Summary of changes: src/plugins/libravatar/libravatar_image.c | 12 +++++++++--- src/plugins/libravatar/libravatar_prefs.c | 9 +++++++++ src/plugins/libravatar/libravatar_prefs.h | 3 +++ 3 files changed, 21 insertions(+), 3 deletions(-) - Log ----------------------------------------------------------------- commit d42f3d7e5f9e65d045be32a71c8a67e7de7a2591 Author: Ricardo Mones Date: Sun Jun 21 19:41:40 2020 +0200 Fix bug 4220 "generates files in cache without content" Also replace "safe" call, since file should not be locked and is going to be deleted anyway. diff --git a/src/plugins/libravatar/libravatar_image.c b/src/plugins/libravatar/libravatar_image.c index b5675aac2..6d0fdac76 100644 --- a/src/plugins/libravatar/libravatar_image.c +++ b/src/plugins/libravatar/libravatar_image.c @@ -83,6 +83,7 @@ static GdkPixbuf *pixbuf_from_url(const gchar *url, const gchar *md5, const gcha curl = curl_easy_init(); if (curl == NULL) { g_warning("could not initialize curl to get image from URL"); + unlink(filename); claws_fclose(file); return NULL; } @@ -113,7 +114,8 @@ static GdkPixbuf *pixbuf_from_url(const gchar *url, const gchar *md5, const gcha res = curl_easy_perform(curl); if (res != CURLE_OK) { debug_print("curl_easy_perfom failed: %s", curl_easy_strerror(res)); - claws_safe_fclose(file); + unlink(filename); + claws_fclose(file); } else { filesize = ftell(file); claws_safe_fclose(file); commit a0cd23ecbb4ea8b3bc76568b47e8e9451678a2cb Author: Ricardo Mones Date: Sun Jun 21 19:40:59 2020 +0200 Fix bug 4325 "Following redirects when retrieving image" Previously hardcoded numbers are now raised to cope with libravatar servers changes and also moved into 3 new hidden preferences for the plugin, for future customisation if required. diff --git a/src/plugins/libravatar/libravatar_image.c b/src/plugins/libravatar/libravatar_image.c index 057569a0f..b5675aac2 100644 --- a/src/plugins/libravatar/libravatar_image.c +++ b/src/plugins/libravatar/libravatar_image.c @@ -99,8 +99,12 @@ static GdkPixbuf *pixbuf_from_url(const gchar *url, const gchar *md5, const gcha curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); if (libravatarprefs.allow_redirects) { - long maxredirs = (libravatarprefs.default_mode == DEF_MODE_URL)? 3L - : ((libravatarprefs.default_mode == DEF_MODE_MM)? 2L: 1L); + long maxredirs = (libravatarprefs.default_mode == DEF_MODE_URL) + ? libravatarprefs.max_redirects_url + : ((libravatarprefs.default_mode == DEF_MODE_MM) + ? libravatarprefs.max_redirects_mm + : libravatarprefs.max_redirects_url); + debug_print("setting max redirects to %ld\n", maxredirs); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_MAXREDIRS, maxredirs); } diff --git a/src/plugins/libravatar/libravatar_prefs.c b/src/plugins/libravatar/libravatar_prefs.c index 5372395ca..5e8717323 100644 --- a/src/plugins/libravatar/libravatar_prefs.c +++ b/src/plugins/libravatar/libravatar_prefs.c @@ -93,6 +93,15 @@ static PrefParam param[] = { { "timeout", "0", &libravatarprefs.timeout, P_INT, NULL, NULL, NULL }, + { "max_redirects_url", "7", + &libravatarprefs.max_redirects_url, + P_INT, NULL, NULL, NULL }, + { "max_redirects_mm", "5", + &libravatarprefs.max_redirects_mm, + P_INT, NULL, NULL, NULL }, + { "max_redirects", "3", + &libravatarprefs.max_redirects, + P_INT, NULL, NULL, NULL }, {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL} }; diff --git a/src/plugins/libravatar/libravatar_prefs.h b/src/plugins/libravatar/libravatar_prefs.h index 49be9645d..2e4cb93c3 100644 --- a/src/plugins/libravatar/libravatar_prefs.h +++ b/src/plugins/libravatar/libravatar_prefs.h @@ -48,6 +48,9 @@ struct _LibravatarPrefs gboolean allow_federated; #endif guint timeout; + guint max_redirects_url; /* hidden pref */ + guint max_redirects_mm; /* hidden pref */ + guint max_redirects; /* hidden pref */ }; extern LibravatarPrefs libravatarprefs; ----------------------------------------------------------------------- hooks/post-receive -- Claws Mail From holger at claws-mail.org Wed Jun 24 18:37:08 2020 From: holger at claws-mail.org (holger at claws-mail.org) Date: Wed, 24 Jun 2020 18:37:08 +0200 (CEST) Subject: [Commits] [SCM] claws branch, master, updated. 3.17.5-25-gfaeb0ebdb Message-ID: <20200624163708.893D140261@claws-mail.org> The branch, master has been updated via faeb0ebdbf220a4760c1fdab05ef86fb845665d7 (commit) from 4ed9411f4dc2801d7f983734ae4003102b8f361d (commit) Summary of changes: src/plugins/notification/notification_plugin.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) - Log ----------------------------------------------------------------- commit faeb0ebdbf220a4760c1fdab05ef86fb845665d7 Author: Holger Berndt Date: Wed Jun 24 18:30:27 2020 +0200 Notification plugin: Add timeout to hide-on-startup until main win is shown again Workaround for bug 3922 diff --git a/src/plugins/notification/notification_plugin.c b/src/plugins/notification/notification_plugin.c index 18671d6e4..90b83a172 100644 --- a/src/plugins/notification/notification_plugin.c +++ b/src/plugins/notification/notification_plugin.c @@ -50,6 +50,10 @@ # include #endif +/* delay in ms until the tray icon shall be embedded in the + system tray before it is assumed that the tray doesn't + work and the main window is shown again */ +#define CM_NOTIFICATION_TRAYICON_SAFETY_NET_DELAY_MS 5000 static gboolean my_folder_item_update_hook(gpointer, gpointer); static gboolean my_folder_update_hook(gpointer, gpointer); @@ -342,7 +346,7 @@ gint plugin_init(gchar **error) notify_config.trayicon_hide_at_startup && claws_is_starting()) { MainWindow *mainwin = mainwindow_get_mainwindow(); - g_idle_add(trayicon_startup_idle,NULL); + g_timeout_add(CM_NOTIFICATION_TRAYICON_SAFETY_NET_DELAY_MS, trayicon_startup_idle,NULL); if(mainwin && gtk_widget_get_visible(GTK_WIDGET(mainwin->window))) main_window_hide(mainwin); main_set_show_at_startup(FALSE); ----------------------------------------------------------------------- hooks/post-receive -- Claws Mail