From 53f55ab8b0eceea32e58880c09785dd35943af0b Mon Sep 17 00:00:00 2001 From: Ryan Mehri Date: Mon, 11 May 2020 21:07:23 -0600 Subject: Simplify hashing comparison --- backend/cache/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend/cache/cache.go') diff --git a/backend/cache/cache.go b/backend/cache/cache.go index 918873e..56581b8 100644 --- a/backend/cache/cache.go +++ b/backend/cache/cache.go @@ -44,7 +44,7 @@ func (c *Cache) Get(hash, userPassword string) (db.Paste, error) { // if there is a password, check the provided one against it if p.Password != "" { // if passwords do not match, the user is unauthorized - if !hashing.ComparePasswords(p.Password, userPassword) { + if !hashing.PasswordsEqual(p.Password, userPassword) { return db.Paste{}, UserUnauthorized } } -- cgit v1.2.3