BUG/MINOR: acl: acl parser does not recognize empty converter list

Commit 348971e (MEDIUM: acl: use the fetch syntax 'fetch(args),conv(),conv()'
into the ACL keyword) introduced a regression in the ACL parser. The second
argument of an ACL keyword is now mistakenly confused with a converter.

This bug is post-dev19 and does not require any backport.
This commit is contained in:
Thierry FOURNIER 2013-12-06 10:34:35 +01:00 committed by Willy Tarreau
parent 2d351b68c2
commit ab92cf3a09

View File

@ -251,6 +251,7 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list *
memprintf(err, "in argument to '%s', %s", expr->kw, *err);
goto out_free_expr;
}
arg = end;
}
else if (ARGM(expr->smp->fetch->arg_mask) == 1) {
int type = (expr->smp->fetch->arg_mask >> 4) & 15;
@ -308,7 +309,10 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list *
*/
/* look for the begining of the converters list */
arg = strchr(args[0], ',');
if (arg)
arg = strchr(arg, ',');
else
arg = strchr(args[0], ',');
if (arg) {
prev_type = expr->smp->fetch->out_type;
while (1) {