From 0b78e9e70cadfaa6aa007a535a332f6422e68ab9 Mon Sep 17 00:00:00 2001 From: Adhityaa Chandrasekar Date: Tue, 19 Feb 2019 00:10:04 -0500 Subject: [PATCH] owner_reset_password.go: use ownerHex in SELECT --- api/owner_reset_password.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/owner_reset_password.go b/api/owner_reset_password.go index c97284b..10d6474 100644 --- a/api/owner_reset_password.go +++ b/api/owner_reset_password.go @@ -18,8 +18,9 @@ func ownerResetPassword(resetHex string, password string) error { statement := ` UPDATE owners SET passwordHash=$1 - WHERE email IN ( - SELECT email FROM ownerResetHexes + WHERE ownerHex = ( + SELECT ownerHex + FROM ownerResetHexes WHERE resetHex=$2 ); `