tool_getparam: -i is not OK if -J is used

Reported-by: sn on hackerone
Bug: https://curl.haxx.se/docs/CVE-2020-8177.html
This commit is contained in:
Daniel Stenberg 2020-05-31 23:09:59 +02:00
parent 26d2755d7c
commit 8236aba585
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 9 additions and 18 deletions

View file

@ -1817,6 +1817,11 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
}
break;
case 'i':
if(config->content_disposition) {
warnf(global,
"--include and --remote-header-name cannot be combined.\n");
return PARAM_BAD_USE;
}
config->show_headers = toggle; /* show the headers as well in the
general output stream */
break;