tool_getparam: accept variable expansion on file names too

Reported-by: PBudmark on github
Fixes #12048
Closes #12055
This commit is contained in:
Daniel Stenberg 2023-10-07 19:36:36 +02:00
parent 38fbe8dbfe
commit f2c8086ff1
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -826,8 +826,9 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
struct curlx_dynbuf nbuf;
bool replaced;
if(aliases[hit].desc != ARG_STRING) {
/* --expand on an option that isn't a string */
if((aliases[hit].desc != ARG_STRING) &&
(aliases[hit].desc != ARG_FILENAME)) {
/* --expand on an option that isn't a string or a filename */
err = PARAM_EXPAND_ERROR;
goto error;
}