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

@@ -81,7 +81,7 @@ func (n *Notification) Send(message string) error {
}
transCfg := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: verifySSL},
TLSClientConfig: &tls.Config{InsecureSkipVerify: verifySSL}, // #nosec
}
client := &http.Client{Transport: transCfg, Timeout: time.Minute * 10}

View File

@@ -43,6 +43,5 @@ func (s Server) Marshal() template.JS {
tag, _ := json.Marshal(s.Tag)
note, _ := json.Marshal(s.Note)
secret, _ := json.Marshal(s.Secret)
return template.JS(fmt.Sprintf(`{"ID":%d,"Name":%s,"Secret":%s,"DisplayIndex":%d,"Tag":%s,"Note":%s}`,
s.ID, name, secret, s.DisplayIndex, tag, note))
return template.JS(fmt.Sprintf(`{"ID":%d,"Name":%s,"Secret":%s,"DisplayIndex":%d,"Tag":%s,"Note":%s}`, s.ID, name, secret, s.DisplayIndex, tag, note)) // #nosec
}