This commit is contained in:
Sebastien Blot 2023-11-17 13:47:05 +01:00
parent d40e9fb760
commit 0e717cb558
No known key found for this signature in database
GPG key ID: DFC2902F40449F6A

View file

@ -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
}