mirror of
https://github.com/curl/curl.git
synced 2026-07-28 09:13:07 +03:00
tool_formparse: accept digits in --form type= strings
Adjusted test 186 to verify.
Regression in 9664d5a547, shipped in 8.11.1
Reported-by: IcedCoffeee on github
Assisted-by: Jay Satiro
Fixes #15761
Closes #15762
This commit is contained in:
parent
fd067bfb5b
commit
f7e065f314
2 changed files with 6 additions and 5 deletions
|
|
@ -495,14 +495,15 @@ static int get_param_part(struct OperationConfig *config, char endchar,
|
|||
;
|
||||
|
||||
if(!endct && checkprefix("type=", p)) {
|
||||
size_t tlen;
|
||||
for(p += 5; ISSPACE(*p); p++)
|
||||
;
|
||||
/* set type pointer */
|
||||
type = p;
|
||||
|
||||
/* find end of content-type */
|
||||
while(*p && (ISALPHA(*p) || (*p == '/') || (*p == '-')))
|
||||
p++;
|
||||
tlen = strcspn(p, "()<>@,;:\\\"[]?=\r\n ");
|
||||
p += tlen;
|
||||
endct = p;
|
||||
sep = *p;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue