Allow for a sequence of semicolons before kw/value pair in a structured header.
* mailbox/mimehdr.c (_header_get_param): Skip superfluous semicolons.
Showing
1 changed file
with
12 additions
and
0 deletions
... | @@ -144,6 +144,18 @@ _header_get_param (const char *field_body, | ... | @@ -144,6 +144,18 @@ _header_get_param (const char *field_body, |
144 | 144 | ||
145 | /* walk upto start of param */ | 145 | /* walk upto start of param */ |
146 | p = mu_str_skip_class (p + 1, MU_CTYPE_SPACE); | 146 | p = mu_str_skip_class (p + 1, MU_CTYPE_SPACE); |
147 | |||
148 | /* Reportedly, some MUAs insert several semicolons */ | ||
149 | if (*p == ';') | ||
150 | continue; | ||
151 | |||
152 | /* Ignore stray characters */ | ||
153 | if (_ISSPECIAL (*p)) | ||
154 | { | ||
155 | p = strchr (p, ';'); | ||
156 | continue; | ||
157 | } | ||
158 | |||
147 | if ((ep = strchr (p, '=')) == NULL) | 159 | if ((ep = strchr (p, '=')) == NULL) |
148 | break; | 160 | break; |
149 | /* Allow for optional whitespace after '=' */ | 161 | /* Allow for optional whitespace after '=' */ | ... | ... |
-
Please register or sign in to post a comment