4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 07:29:24 +00:00

Enable gosec linter (#645)

This commit is contained in:
Duco van Amstel
2018-12-05 23:40:55 +00:00
committed by Wim
parent 8a7efce941
commit af7a00d030
5 changed files with 14 additions and 9 deletions

View File

@ -2,7 +2,7 @@ package gateway
import (
"bytes"
"crypto/sha1"
"crypto/sha1" //nolint:gosec
"fmt"
"io/ioutil"
"net/http"
@ -466,7 +466,7 @@ func (gw *Gateway) handleFiles(msg *config.Message) {
fi.Name = reg.ReplaceAllString(fi.Name, "_")
fi.Name += ext
sha1sum := fmt.Sprintf("%x", sha1.Sum(*fi.Data))[:8]
sha1sum := fmt.Sprintf("%x", sha1.Sum(*fi.Data))[:8] //nolint:gosec
if gw.BridgeValues().General.MediaServerUpload != "" {
// Use MediaServerUpload. Upload using a PUT HTTP request and basicauth.