Add time for better randomisation for a hash.
This commit is contained in:
parent
3f16c3e799
commit
92212c97eb
@ -92,6 +92,7 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
fHash := hex.EncodeToString(s256.Sum(nil))
|
fHash := hex.EncodeToString(s256.Sum(nil))
|
||||||
s256.Write([]byte(h.hashSalt))
|
s256.Write([]byte(h.hashSalt))
|
||||||
|
s256.Write([]byte(time.Now().String()))
|
||||||
fSaltedHash := base64.RawURLEncoding.EncodeToString(s256.Sum(nil))
|
fSaltedHash := base64.RawURLEncoding.EncodeToString(s256.Sum(nil))
|
||||||
|
|
||||||
f.Seek(0, io.SeekStart)
|
f.Seek(0, io.SeekStart)
|
||||||
|
Loading…
Reference in New Issue
Block a user