pkgsrc/mail/claws-mail-vcalendar/patches/patch-CVE-2012-5527_1
drochner f2c5f61652 don't display the URL when fetching calendars, it could contain
credentials (CVE-2012-5527), patch from upstream
bump PKGREV
2012-11-29 11:01:15 +00:00

67 lines
1.9 KiB
Text

$NetBSD: patch-CVE-2012-5527_1,v 1.1 2012/11/29 11:01:16 drochner Exp $
http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2782
--- src/vcal_folder.c.orig 2011-11-16 05:41:53.000000000 +0000
+++ src/vcal_folder.c
@@ -1609,7 +1609,7 @@ void *url_read_thread(void *data)
return GINT_TO_POINTER(0);
}
-gchar *vcal_curl_read(const char *url, gboolean verbose,
+gchar *vcal_curl_read(const char *url, const gchar *label, gboolean verbose,
void (*callback)(const gchar *url, gchar *data, gboolean verbose, gchar *error))
{
gchar *result;
@@ -1618,25 +1618,19 @@ gchar *vcal_curl_read(const char *url, g
pthread_t pt;
pthread_attr_t pta;
#endif
- gchar *msg;
void *res;
gboolean killed;
gchar *error = NULL;
result = NULL;
td = g_new0(thread_data, 1);
- msg = NULL;
res = NULL;
killed = FALSE;
-
+
td->url = url;
td->result = NULL;
td->done = FALSE;
-
- msg = g_strdup_printf(_("Fetching '%s'..."), url);
-
- STATUSBAR_PUSH(mainwindow_get_mainwindow(), msg);
-
- g_free(msg);
+
+ STATUSBAR_PUSH(mainwindow_get_mainwindow(), label);
#ifdef USE_PTHREAD
if (pthread_attr_init(&pta) != 0 ||
@@ -1868,7 +1862,8 @@ static void update_subscription_finish(c
static void update_subscription(const gchar *uri, gboolean verbose)
{
FolderItem *item = get_folder_item_for_uri(uri);
-
+ gchar *label;
+
if (prefs_common_get_prefs()->work_offline) {
if (!verbose ||
!inc_offline_should_override(TRUE,
@@ -1882,7 +1877,11 @@ static void update_subscription(const gc
return;
}
main_window_cursor_wait(mainwindow_get_mainwindow());
- vcal_curl_read(uri, verbose, update_subscription_finish);
+
+ label = g_strdup_printf(_("Fetching calendar for %s..."),
+ item && item->name ? item->name : _("new subscription"));
+ vcal_curl_read(uri, label, verbose, update_subscription_finish);
+ g_free(label);
}
static void check_subs_cb(GtkAction *action, gpointer data)