gosec

This commit is contained in:
naiba
2021-09-04 12:42:51 +08:00
parent 67faa7a63d
commit e40026f6cc
8 changed files with 13 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
package dao
import (
"crypto/md5"
"crypto/md5" // #nosec
"encoding/hex"
"log"
"sync"
@@ -45,7 +45,7 @@ func OnDeleteNotification(id uint64) {
func SendNotification(desc string, muteable bool) {
if muteable {
// 通知防骚扰策略
nID := hex.EncodeToString(md5.New().Sum([]byte(desc)))
nID := hex.EncodeToString(md5.New().Sum([]byte(desc))) // #nosec
var flag bool
if cacheN, has := Cache.Get(nID); has {
nHistory := cacheN.(NotificationHistory)