fix bug 3235, 'Extraneous double quotes inside base64-encoded From header confuse...
authorPaul <paul@claws-mail.org>
Wed, 30 Jul 2014 07:31:03 +0000 (08:31 +0100)
committerPaul <paul@claws-mail.org>
Wed, 30 Jul 2014 07:31:03 +0000 (08:31 +0100)
src/unmime.c

index 6dee7f3a36dbd5584875309c734f618049c034e5..2054c14f808a7990ec458e1967ac7ec0c22b1f6f 100644 (file)
@@ -134,7 +134,8 @@ gchar *unmime_header(const gchar *encoded_str, gboolean addr_field)
                 * We check there are no quotes just to be sure. If there
                 * are, well, the comma won't pose a problem, probably.
                 */
                 * We check there are no quotes just to be sure. If there
                 * are, well, the comma won't pose a problem, probably.
                 */
-               if (addr_field && strchr(decoded_text, ',') && !in_quote) {
+               if (addr_field && strchr(decoded_text, ',') && !in_quote &&
+                   !strchr(decoded_text, '"')) {
                        gchar *tmp = g_strdup_printf("\"%s\"", decoded_text);
                        g_free(decoded_text);
                        decoded_text = tmp;
                        gchar *tmp = g_strdup_printf("\"%s\"", decoded_text);
                        g_free(decoded_text);
                        decoded_text = tmp;