diff --git a/internal/corazawaf/transaction.go b/internal/corazawaf/transaction.go index 3c9daa994..2a1197d22 100644 --- a/internal/corazawaf/transaction.go +++ b/internal/corazawaf/transaction.go @@ -549,13 +549,13 @@ func (tx *Transaction) GetField(rv ruleVariableParams) []types.MatchData { if m, ok := col.(collection.Keyed); ok { matches = m.FindRegex(rv.KeyRx) } else { - tx.WAF.Logger.Error().Msg("attempted to use regex with non-selectable collection: " + rv.Variable.Name()) + panic("attempted to use regex with non-selectable collection: " + rv.Variable.Name()) } case rv.KeyStr != "": if m, ok := col.(collection.Keyed); ok { matches = m.FindString(rv.KeyStr) } else { - tx.WAF.Logger.Error().Msg("attempted to use string with non-selectable collection: " + rv.Variable.Name()) + panic("attempted to use string with non-selectable collection: " + rv.Variable.Name()) } default: matches = col.FindAll()