fix outofband evt generation
This commit is contained in:
parent
353926ec91
commit
cbf06c25fb
|
@ -578,7 +578,6 @@ func (r *WafRunner) Run(t *tomb.Tomb) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("cannot create event from waap context : %w", err)
|
return fmt.Errorf("cannot create event from waap context : %w", err)
|
||||||
}
|
}
|
||||||
r.logger.Infof("REAL MATCHED RULES: %+v", len(tmpEvt.Waap.MatchedRules))
|
|
||||||
evt = &tmpEvt
|
evt = &tmpEvt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -586,9 +585,14 @@ func (r *WafRunner) Run(t *tomb.Tomb) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("cannot convert transaction to event : %w", err)
|
return fmt.Errorf("cannot convert transaction to event : %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// expTx.MatchedRules() returns also rules that set variables
|
||||||
|
// in evt.Waap.MatchedRules we have filtered those rules
|
||||||
|
if len(evt.Waap.MatchedRules) > 0 {
|
||||||
LogWaapEvent(evt)
|
LogWaapEvent(evt)
|
||||||
r.outChan <- *evt
|
r.outChan <- *evt
|
||||||
}
|
}
|
||||||
|
}
|
||||||
expTx.Close()
|
expTx.Close()
|
||||||
//measure the full time spent in the WAF
|
//measure the full time spent in the WAF
|
||||||
totalElapsed := time.Since(startParsing)
|
totalElapsed := time.Since(startParsing)
|
||||||
|
|
Loading…
Reference in a new issue