]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/commitdiff
error is not defined here
authorJohannes Zellner <johannes@cloudron.io>
Sat, 23 Feb 2019 22:23:42 +0000 (23:23 +0100)
committerJohannes Zellner <johannes@cloudron.io>
Sat, 23 Feb 2019 22:23:42 +0000 (23:23 +0100)
src/auth.js

index e148fb75043529c3049b98d6dd4595d8929ca801..80fa122a6c87cffc4cdb3622bb61148efef7a900 100644 (file)
@@ -96,7 +96,7 @@ function verifyUser(username, password, callback) {
                 result.on('searchEntry', function(entry) { items.push(entry.object); });
                 result.on('error', callback);
                 result.on('end', function (result) {
-                    if (result.status !== 0 || items.length === 0) return callback(error);
+                    if (result.status !== 0 || items.length === 0) return callback('Invalid credentials');
 
                     // pick the first found
                     var user = items[0];