Node.js based forum software built for the modern web
fix: allow local (and overridden) login strategies to pass Error objects back
Julian Lam98b72ca57222
diff --git a/src/controllers/authentication.js b/src/controllers/authentication.jsindex 5d8cc4dff4..f57eb185be 100644--- a/src/controllers/authentication.js+++ b/src/controllers/authentication.js@@ -266,7 +266,9 @@ function continueLogin(strategy, req, res, next) {}if (!userData) {- if (typeof info === 'object') {+ if (info instanceof Error) {+ info = info.message;+ } else if (typeof info === 'object') {info = '[[error:invalid-username-or-password]]';}return helpers.noScriptErrors(req, res, info, 403);