Skip to content

Commit

Permalink
remove fatal
Browse files Browse the repository at this point in the history
  • Loading branch information
jptosso committed Oct 31, 2023
1 parent f88163d commit 13c7e4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/corazawaf/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
panic("attempted to use regex with non-selectable collection: " + rv.Variable.Name())
tx.WAF.Logger.Error().Msg("attempted to use regex with non-selectable collection: " + rv.Variable.Name())

Check warning on line 552 in internal/corazawaf/transaction.go

View check run for this annotation

Codecov / codecov/patch

internal/corazawaf/transaction.go#L552

Added line #L552 was not covered by tests
}
case rv.KeyStr != "":
if m, ok := col.(collection.Keyed); ok {
matches = m.FindString(rv.KeyStr)
} else {
panic("attempted to use string with non-selectable collection: " + rv.Variable.Name())
tx.WAF.Logger.Error().Msg("attempted to use string with non-selectable collection: " + rv.Variable.Name())

Check warning on line 558 in internal/corazawaf/transaction.go

View check run for this annotation

Codecov / codecov/patch

internal/corazawaf/transaction.go#L558

Added line #L558 was not covered by tests
}
default:
matches = col.FindAll()
Expand Down

0 comments on commit 13c7e4b

Please sign in to comment.