diff options
author | Daniel Stenberg <daniel@haxx.se> | 2023-10-07 19:36:36 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-10-08 00:28:50 +0200 |
commit | f2c8086ff15e6e995e1aef328e630bd0b91c768f (patch) | |
tree | 2ddefc30ab060769110371652f18980e8cca10c9 | |
parent | 38fbe8dbfe796745e3d98ee72d0e5c30cb1b2be3 (diff) | |
download | curl-f2c8086ff15e6e995e1aef328e630bd0b91c768f.tar.gz |
tool_getparam: accept variable expansion on file names too
Reported-by: PBudmark on github
Fixes #12048
Closes #12055
-rw-r--r-- | src/tool_getparam.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c index cd9ce7b5a..d9772a309 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -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; } |