diff options
| author | Ryan Mehri <[email protected]> | 2020-05-11 21:07:23 -0600 |
|---|---|---|
| committer | Ryan Mehri <[email protected]> | 2020-05-11 21:07:23 -0600 |
| commit | 53f55ab8b0eceea32e58880c09785dd35943af0b (patch) | |
| tree | 8ecea62dff7644ec3cc4bde30d711f9204bf0b92 /backend/cache | |
| parent | Rename good (diff) | |
| download | ctrl-v-53f55ab8b0eceea32e58880c09785dd35943af0b.tar.xz ctrl-v-53f55ab8b0eceea32e58880c09785dd35943af0b.zip | |
Simplify hashing comparison
Diffstat (limited to 'backend/cache')
| -rw-r--r-- | backend/cache/cache.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 } } |