From af7a00d030b89a0fa1c85da8f3a1485c8a757fa1 Mon Sep 17 00:00:00 2001 From: Duco van Amstel Date: Wed, 5 Dec 2018 23:40:55 +0000 Subject: Enable gosec linter (#645) --- gateway/gateway.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gateway') diff --git a/gateway/gateway.go b/gateway/gateway.go index 2874ef24..0ee7a616 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -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. -- cgit v1.2.3