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 ); `