WAF规则模板中XSS注入检测规则使用“包含XSS注入”操作符替代以往的正则表达式

This commit is contained in:
刘祥超
2023-12-09 17:00:21 +08:00
parent ee2565905e
commit e03292de28
2 changed files with 49 additions and 46 deletions

View File

@@ -36,6 +36,10 @@ func (this *PageAction) WillChange() bool {
// Perform the action
func (this *PageAction) Perform(waf *WAF, group *RuleGroup, set *RuleSet, request requests.Request, writer http.ResponseWriter) (continueRequest bool, goNextSet bool) {
if writer == nil {
return
}
request.ProcessResponseHeaders(writer.Header(), this.Status)
writer.Header().Set("Content-Type", "text/html; charset=utf-8")
writer.WriteHeader(this.Status)