tool_getparam: ECH param parsing refix
Regression. Fixes #16006 Reported-by: Milon Renatus Closes #16010
This commit is contained in:
parent
a6eac83481
commit
ca1594e707
@ -1132,13 +1132,11 @@ static ParameterError parse_ech(struct GlobalConfig *global,
|
|||||||
err = PARAM_LIBCURL_DOESNT_SUPPORT;
|
err = PARAM_LIBCURL_DOESNT_SUPPORT;
|
||||||
else if(strlen(nextarg) > 4 && strncasecompare("pn:", nextarg, 3)) {
|
else if(strlen(nextarg) > 4 && strncasecompare("pn:", nextarg, 3)) {
|
||||||
/* a public_name */
|
/* a public_name */
|
||||||
nextarg += 3;
|
|
||||||
err = getstr(&config->ech_public, nextarg, DENY_BLANK);
|
err = getstr(&config->ech_public, nextarg, DENY_BLANK);
|
||||||
}
|
}
|
||||||
else if(strlen(nextarg) > 5 && strncasecompare("ecl:", nextarg, 4)) {
|
else if(strlen(nextarg) > 5 && strncasecompare("ecl:", nextarg, 4)) {
|
||||||
/* an ECHConfigList */
|
/* an ECHConfigList */
|
||||||
nextarg += 4;
|
if('@' != *(nextarg + 4)) {
|
||||||
if('@' != *nextarg) {
|
|
||||||
err = getstr(&config->ech_config, nextarg, DENY_BLANK);
|
err = getstr(&config->ech_config, nextarg, DENY_BLANK);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1146,7 +1144,7 @@ static ParameterError parse_ech(struct GlobalConfig *global,
|
|||||||
char *tmpcfg = NULL;
|
char *tmpcfg = NULL;
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
|
||||||
nextarg++; /* skip over '@' */
|
nextarg += 5; /* skip over 'ecl:@' */
|
||||||
if(!strcmp("-", nextarg)) {
|
if(!strcmp("-", nextarg)) {
|
||||||
file = stdin;
|
file = stdin;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user