Skip to content

Commit c02f76c

Browse files
committed
修复规则命中记录的错误
1 parent 2618305 commit c02f76c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/attack_report.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,9 @@ func (r *Report) GetRuleHitList(request *http.Request) core.Response {
895895
})
896896
}
897897
sort.Slice(file_data, func(i, j int) bool {
898+
if file_data[i] == nil || file_data[j] == nil {
899+
return false
900+
}
898901
return file_data[i]["timestimp"].(int64) > file_data[j]["timestimp"].(int64)
899902
})
900903
data2 := public.PaginateData(file_data, params.P, params.PSize)

0 commit comments

Comments
 (0)