diff --git a/internal/collections/named.go b/internal/collections/named.go index 8cfb81240..4189a7544 100644 --- a/internal/collections/named.go +++ b/internal/collections/named.go @@ -95,11 +95,13 @@ type NamedCollectionNames struct { } func (c *NamedCollectionNames) FindRegex(key *regexp.Regexp) []types.MatchData { - panic("selection operator not supported") + // not supported + return []types.MatchData{} } func (c *NamedCollectionNames) FindString(key string) []types.MatchData { - panic("selection operator not supported") + // not supported + return []types.MatchData{} } func (c *NamedCollectionNames) FindAll() []types.MatchData { diff --git a/internal/corazawaf/transaction_test.go b/internal/corazawaf/transaction_test.go index 938aef632..cf345164c 100644 --- a/internal/corazawaf/transaction_test.go +++ b/internal/corazawaf/transaction_test.go @@ -1159,7 +1159,7 @@ func makeTransaction(t testing.TB) *Transaction { data := strings.Join(ht, "\r\n") _, err := tx.ParseRequestReader(strings.NewReader(data)) if err != nil { - panic(err) + t.Fatal(err) } return tx } @@ -1199,7 +1199,7 @@ func makeTransactionMultipart(t *testing.T) *Transaction { data := strings.Join(ht, "\r\n") _, err := tx.ParseRequestReader(strings.NewReader(data)) if err != nil { - panic(err) + t.Fatal(err) } return tx }