mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-25 03:35:21 +01:00
Fix semgrep use-of-weak-crypto error (#15784)
Signed-off-by: Soumik Majumder <soumikm@vmware.com>
This commit is contained in:
parent
7fc22e4344
commit
2679b2427b
4
src/lib/cache/redis/redis.go
vendored
4
src/lib/cache/redis/redis.go
vendored
@ -15,7 +15,7 @@
|
||||
package redis
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
@ -107,7 +107,7 @@ func New(opts cache.Options) (cache.Cache, error) {
|
||||
opts.Address = "redis://localhost:6379/0"
|
||||
}
|
||||
|
||||
name := fmt.Sprintf("%x", md5.Sum([]byte(opts.Address)))
|
||||
name := fmt.Sprintf("%x", sha256.Sum256([]byte(opts.Address)))
|
||||
|
||||
param := &libredis.PoolParam{
|
||||
PoolMaxIdle: 100,
|
||||
|
Loading…
Reference in New Issue
Block a user