Commit 37f87dce 37f87dce4a7b47cb4b61163b6f66ea6658eaf23b by Sergey Poznyakoff

Allow for a sequence of semicolons before kw/value pair in a structured header.

* mailbox/mimehdr.c (_header_get_param): Skip superfluous semicolons.
1 parent b4b8b6ec
......@@ -144,6 +144,18 @@ _header_get_param (const char *field_body,
/* walk upto start of param */
p = mu_str_skip_class (p + 1, MU_CTYPE_SPACE);
/* Reportedly, some MUAs insert several semicolons */
if (*p == ';')
continue;
/* Ignore stray characters */
if (_ISSPECIAL (*p))
{
p = strchr (p, ';');
continue;
}
if ((ep = strchr (p, '=')) == NULL)
break;
/* Allow for optional whitespace after '=' */
......