aboutsummaryrefslogtreecommitdiff
path: root/backend/cache
diff options
context:
space:
mode:
authorRyan Mehri <[email protected]>2020-05-11 23:02:02 -0600
committerRyan Mehri <[email protected]>2020-05-11 23:02:02 -0600
commit8789074ecdaeecdd721a5fa2a4e32840f6231d44 (patch)
tree58f4c06116a73be078186a9b46e986e430106b72 /backend/cache
parentSimplify hashing comparison (diff)
downloadctrl-v-8789074ecdaeecdd721a5fa2a4e32840f6231d44.tar.xz
ctrl-v-8789074ecdaeecdd721a5fa2a4e32840f6231d44.zip
fix issue with empty password being hashed
Diffstat (limited to 'backend/cache')
-rw-r--r--backend/cache/cache.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/backend/cache/cache.go b/backend/cache/cache.go
index 56581b8..f999d86 100644
--- a/backend/cache/cache.go
+++ b/backend/cache/cache.go
@@ -42,6 +42,7 @@ func (c *Cache) Get(hash, userPassword string) (db.Paste, error) {
}
// if there is a password, check the provided one against it
+ println(p.Password)
if p.Password != "" {
// if passwords do not match, the user is unauthorized
if !hashing.PasswordsEqual(p.Password, userPassword) {