Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
piyushroshan committed Nov 8, 2024
1 parent db5d0c6 commit 2ce0c29
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions internal/corazawaf/rule_multiphase.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ package corazawaf

import (
"strings"
"unsafe"

experimentalTypes "github.com/corazawaf/coraza/v3/experimental/types"
"github.com/corazawaf/coraza/v3/internal/corazarules"
"github.com/corazawaf/coraza/v3/types"
"github.com/corazawaf/coraza/v3/types/variables"
)
Expand Down Expand Up @@ -321,15 +321,14 @@ func isMultiphaseDoubleEvaluation(tx *Transaction, phase types.RulePhase, r *Rul
matchedDatas := matchedRule.MatchedDatas()
var matchedDatasExp []experimentalTypes.MatchData
for _, v := range matchedDatas {
matchedDatasExp = append(matchedDatasExp, &experimentalTypes.MatchData{
Variable_: v.Variable(),
Key_: v.Key(),
Value_: v.Value(),
Message_: v.Message(),
Data_: v.Data(),
matchedDatasExp = append(matchedDatasExp, &corazarules.MatchData{
Variable_: v.Variable(),
Key_: v.Key(),
Value_: v.Value(),
Message_: v.Message(),
Data_: v.Data(),
ChainLevel_: v.ChainLevel(),
})
}
}
if matchedRule.Rule().ID() == r.ParentID_ && matchedChainDepth(matchedDatasExp) == matchedChainDepth(*collectiveMatchedValues) {
// This might be a double match, let's generate the chains that aready matched and the one that just matched
Expand Down

0 comments on commit 2ce0c29

Please sign in to comment.