Skip to content

Commit

Permalink
gosec fixes for issue #9
Browse files Browse the repository at this point in the history
  • Loading branch information
phires committed Jun 10, 2024
1 parent 5931187 commit c621504
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backends/p_guerrilla_db_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ func GuerrillaDbRedis() Decorator {
e.TLS)
// give the values to a random query batcher
var index int
err := binary.Read(rand.Reader, binary.LittleEndian, &index)
err = binary.Read(rand.Reader, binary.LittleEndian, &index)
if err != nil {
panic(err)
}
Expand Down
4 changes: 2 additions & 2 deletions backends/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package backends
import (
"bytes"
"compress/zlib"
"crypto/md5"
"crypto/md5" //#nosec G501 - Deprecated, kept for backwards compatibility
"fmt"
"io"
"net/textproto"
Expand Down Expand Up @@ -53,7 +53,7 @@ func ParseHeaders(mailData string) map[string]string {
// - string: The hexadecimal representation of the MD5 hash.
// Deprecated: use BLAKE128s128Hex instead
func MD5Hex(stringArguments ...string) string {
h := md5.New()
h := md5.New() //#nosec G401 - Deprecated, kept for backwards compatibility
var r *strings.Reader
for i := 0; i < len(stringArguments); i++ {
r = strings.NewReader(stringArguments[i])
Expand Down

0 comments on commit c621504

Please sign in to comment.