always set inband transaction even if we have no rules (#2681)

This commit is contained in:
blotus 2023-12-22 10:18:35 +01:00 committed by GitHub
parent bc9bfa81b2
commit a62e28fdfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,11 +192,11 @@ func (r *AppsecRunner) processRequest(tx appsec.ExtendedTransaction, request *ap
} }
func (r *AppsecRunner) ProcessInBandRules(request *appsec.ParsedRequest) error { func (r *AppsecRunner) ProcessInBandRules(request *appsec.ParsedRequest) error {
tx := appsec.NewExtendedTransaction(r.AppsecInbandEngine, request.UUID)
r.AppsecRuntime.InBandTx = tx
if len(r.AppsecRuntime.InBandRules) == 0 { if len(r.AppsecRuntime.InBandRules) == 0 {
return nil return nil
} }
tx := appsec.NewExtendedTransaction(r.AppsecInbandEngine, request.UUID)
r.AppsecRuntime.InBandTx = tx
err := r.processRequest(tx, request) err := r.processRequest(tx, request)
return err return err
} }