diff options
Diffstat (limited to 'internal/player/password.go')
| -rw-r--r-- | internal/player/password.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/player/password.go b/internal/player/password.go index 5a43e1b..de5fe5f 100644 --- a/internal/player/password.go +++ b/internal/player/password.go @@ -120,7 +120,7 @@ func CheckPassword(password, stored string) bool { return false } hash := sha256.Sum256(append(salt, []byte(password)...)) - return legacy[2] == fmt.Sprintf("%x", hash) + return subtle.ConstantTimeCompare([]byte(legacy[2]), []byte(fmt.Sprintf("%x", hash))) == 1 default: return false } |
