1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-15 14:05:03 -05:00

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
This commit is contained in:
Cherish98 2020-12-23 12:59:00 +00:00 committed by Daniel Stenberg
parent e99e5ab820
commit 6a5e020d4d
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -2542,7 +2542,7 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[])
/* Parse .curlrc if necessary */ /* Parse .curlrc if necessary */
if((argc == 1) || if((argc == 1) ||
(!curl_strequal(first_arg, "-q") && (strncmp(first_arg, "-q", 2) &&
!curl_strequal(first_arg, "--disable"))) { !curl_strequal(first_arg, "--disable"))) {
parseconfig(NULL, global); /* ignore possible failure */ parseconfig(NULL, global); /* ignore possible failure */