]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_getparam: accept variable expansion on file names too
authorDaniel Stenberg <daniel@haxx.se>
Sat, 7 Oct 2023 17:36:36 +0000 (19:36 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 7 Oct 2023 22:28:50 +0000 (00:28 +0200)
Reported-by: PBudmark on github
Fixes #12048
Closes #12055

src/tool_getparam.c

index cd9ce7b5adc7da7ed8f4f9bb42cbd9314a12e680..d9772a309a49e9871b49cbac56faea471e6d21d5 100644 (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;
       }