This commit is contained in:
Sebastien Blot 2023-07-24 15:22:44 +02:00
parent f7e098047f
commit 2f5a6fbb4f
No known key found for this signature in database
GPG key ID: DFC2902F40449F6A
2 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,7 @@ func EventFromRequest(r waf.ParsedRequest) (types.Event, error) {
Src: "waf",
Raw: "dummy-waf-data", //we discard empty Line.Raw items :)
}
evt.Waap = []map[string]interface{}{}
evt.Waap = types.WaapEvent{}
return evt, nil
}
@ -106,7 +106,7 @@ func (r *WafRunner) AccumulateTxToEvent(tx experimental.FullTransaction, kind st
"msg": rule.Message(),
"severity": rule.Rule().Severity().String(),
}
evt.Waap = append(evt.Waap, corazaRule)
evt.Waap.MatchedRules = append(evt.Waap.MatchedRules, corazaRule)
}
return nil

View file

@ -67,7 +67,7 @@ func (w WaapEvent) GetVar(varName string) string {
if w.Vars[parsed[0]] == "" {
return ""
}
return w.Vars[parsed[0]][parsed[1]]
//return w.Vars[parsed[0]][parsed[1]]
}
log.Warningf("invalid variable name %s", varName)
return ""