From 6a5e020d4d2b04a57d57eea7a9ba23cc0c68cb51 Mon Sep 17 00:00:00 2001 From: Cherish98 <66007047+Cherish98@users.noreply.github.com> Date: Wed, 23 Dec 2020 12:59:00 +0000 Subject: [PATCH] curl: fix handling of -q option The match of the "-q" option (short for "--disable") should: a) allow concatenation with other single-letters; and b) be case-sensitive, lest confusing with "-Q" ("--quote") Closes #6364 --- src/tool_operate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tool_operate.c b/src/tool_operate.c index 23dfa635e..9e80ca2e5 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -2542,7 +2542,7 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]) /* Parse .curlrc if necessary */ if((argc == 1) || - (!curl_strequal(first_arg, "-q") && + (strncmp(first_arg, "-q", 2) && !curl_strequal(first_arg, "--disable"))) { parseconfig(NULL, global); /* ignore possible failure */