From eef9e22c429bf960101a63f77624614d959771c7 Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Sun, 20 May 2012 12:46:13 -0600
Subject: [PATCH] fix bug preventing proper handling of old style verification
 links by new style code, documented exhaustively in issue #1592.

---
 lib/db/mysql.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/db/mysql.js b/lib/db/mysql.js
index c8b857dd1..8c2d805e6 100644
--- a/lib/db/mysql.js
+++ b/lib/db/mysql.js
@@ -291,7 +291,7 @@ exports.authForVerificationSecret = function(secret, cb) {
       if (o.passwd) return cb(null, o.passwd, o.existing_user);
 
       // otherwise, let's get the passwd from the user record
-      if (!o.existing_user) cb("no password for user");
+      if (!o.existing_user) return cb("no password for user");
 
       exports.checkAuth(o.existing_user, function(err, hash) {
         cb(err, hash, o.existing_user);
-- 
GitLab