BUG/MEDIUM: acl: always accept match "found"
The pattern match "found" fails to parse on binary type samples. The reason is that it presents itself as an integer type which bin cannot be cast into. We must always accept this match since it validates anything on input regardless of the type. Let's just relax the parser to accept it. This problem might also exist in 1.5. (cherry picked from commit 91cc2368a73198bddc3e140d267cce4ee08cf20e)
This commit is contained in:
parent
d7bdcb874b
commit
9bb49f6906
@ -487,7 +487,7 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list *
|
||||
}
|
||||
|
||||
/* Note: -m found is always valid, bool/int are compatible, str/bin/reg/len are compatible */
|
||||
if (!sample_casts[cur_type][pat_match_types[idx]]) {
|
||||
if (idx != PAT_MATCH_FOUND && !sample_casts[cur_type][pat_match_types[idx]]) {
|
||||
memprintf(err, "matching method '%s' cannot be used with fetch keyword '%s'", args[1], expr->kw);
|
||||
goto out_free_expr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user