From 0e717cb55859ae227bd436b0d5c410b01a7f78cc Mon Sep 17 00:00:00 2001 From: Sebastien Blot Date: Fri, 17 Nov 2023 13:47:05 +0100 Subject: [PATCH] up --- pkg/waf/waap_rules_collection.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/waf/waap_rules_collection.go b/pkg/waf/waap_rules_collection.go index 6c28d21dd..1b579a735 100644 --- a/pkg/waf/waap_rules_collection.go +++ b/pkg/waf/waap_rules_collection.go @@ -53,14 +53,21 @@ func LoadCollection(pattern string) ([]WaapCollection, error) { for _, waapRule := range waapRules { - matched, err := exprhelpers.Match(pattern, waapRule.Name) + tmpMatch, err := exprhelpers.Match(pattern, waapRule.Name) if err != nil { log.Errorf("unable to match %s with %s : %s", waapRule.Name, pattern, err) continue } - if !matched.(bool) { + matched, ok := tmpMatch.(bool) + + if !ok { + log.Errorf("unable to match %s with %s : %s", waapRule.Name, pattern, err) + continue + } + + if !matched { continue }