Hello community, here is the log from the commit of package claws-mail for openSUSE:Factory checked in at 2013-11-08 08:34:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/claws-mail (Old) and /work/SRC/openSUSE:Factory/.claws-mail.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "claws-mail" Changes: -------- --- /work/SRC/openSUSE:Factory/claws-mail/claws-mail.changes 2013-09-11 11:12:50.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.claws-mail.new/claws-mail.changes 2013-11-08 08:34:41.000000000 +0100 @@ -1,0 +2,7 @@ +Wed Nov 6 01:21:22 UTC 2013 - [email protected] + +- Add claws-mail-fix-address-quotes.patch: Fix quotes all + addresses which need quoting just before writting the + message to the queue folder, claws#2210. + +------------------------------------------------------------------- New: ---- claws-mail-fix-address-quotes.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ claws-mail.spec ++++++ --- /var/tmp/diff_new_pack.G67sJJ/_old 2013-11-08 08:34:42.000000000 +0100 +++ /var/tmp/diff_new_pack.G67sJJ/_new 2013-11-08 08:34:42.000000000 +0100 @@ -31,6 +31,8 @@ Source0: http://downloads.sourceforge.net/project/sylpheed-claws/Claws%20Mail/3.9.2/%{name}-%{version}.tar.bz2 # PATCH-FIX-UPSTREAM claws-mail-missing-include.patch [email protected] -- Add missing includes; patch given to upstream Patch0: claws-mail-missing-include.patch +# PATCH-FIX-UPSTREAM claws-mail-fix-address-quotes.patch claws#2210 [email protected] -- Fix quotes all addresses which need quoting just before writting the message to the queue folder. +Patch1: claws-mail-fix-address-quotes.patch BuildRequires: NetworkManager-devel BuildRequires: compface BuildRequires: db-devel @@ -123,6 +125,7 @@ %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %configure \ ++++++ claws-mail-fix-address-quotes.patch ++++++ >From d07722d7d00132463f5a86266c22140a69aa477a Mon Sep 17 00:00:00 2001 From: Ricardo Mones <[email protected]> Date: Fri, 25 Oct 2013 14:09:00 +0200 Subject: [PATCH] Fix bug #2210, but not on Address Book MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bug report is titled 'Display name with invalid addresses not quoted when inserted from address book', but the real problem is not the AB. AB doesn't care about the address format or validity, the problem is sending those addresses to the SMTP server, which, as seen in the wild¹, might care. Fix quotes all addresses which need quoting just before writting the message to the queue folder. ¹http://lists.claws-mail.org/pipermail/users/2013-October/007485.html --- src/compose.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/compose.c b/src/compose.c index b5cec4f..1c8b05b 100644 --- a/src/compose.c +++ b/src/compose.c @@ -6129,6 +6129,44 @@ static int compose_add_attachments(Compose *compose, MimeInfo *parent) return 0; } +static gchar *compose_quote_list_of_addresses(gchar *str) +{ + GSList *list = NULL, *item = NULL; + gchar *qname = NULL, *faddr = NULL, *result = NULL; + + list = address_list_append_with_comments(list, str); + for (item = list; item != NULL; item = item->next) { + gchar *spec = item->data; + gchar *endofname = strstr(spec, " <"); + *endofname = '\0'; + QUOTE_IF_REQUIRED_NORMAL(qname, spec, return NULL); + *endofname = ' '; + if (*qname != *spec) { /* has been quoted, compute new */ + gchar *addr = g_strdup(endofname); + gchar *name = g_strdup(qname); + faddr = g_strconcat(name, addr, NULL); + g_free(name); + g_free(addr); + debug_print("new auto-quoted address: '%s'", faddr); + } + if (result == NULL) + result = g_strdup((faddr != NULL)? faddr: spec); + else { + result = g_strconcat(result, + ", ", + (faddr != NULL)? faddr: spec, + NULL); + } + if (faddr != NULL) { + g_free(faddr); + faddr = NULL; + } + } + slist_free_strings_full(list); + + return result; +} + #define IS_IN_CUSTOM_HEADER(header) \ (compose->account->add_customhdr && \ custom_header_find(compose->account->customhdr_list, header) != NULL) @@ -6161,9 +6199,11 @@ static void compose_add_headerfield_from_headerlist(Compose *compose, headerentryname = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((headerentry->combo))))); if (!g_utf8_collate(trans_fieldname, headerentryname)) { - str = gtk_editable_get_chars(GTK_EDITABLE(headerentry->entry), 0, -1); - g_strstrip(str); - if (str[0] != '\0') { + gchar * ustr = gtk_editable_get_chars(GTK_EDITABLE(headerentry->entry), 0, -1); + g_strstrip(ustr); + str = compose_quote_list_of_addresses(ustr); + g_free(ustr); + if (str != NULL && str[0] != '\0') { if (add_field) g_string_append(fieldstr, seperator); g_string_append(fieldstr, str); -- 1.7.0.4 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
