mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: username trim on login, closes #6894
This commit is contained in:
@@ -224,6 +224,7 @@ authenticationController.login = function (req, res, next) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var loginWith = meta.config.allowLoginWith || 'username-email';
|
var loginWith = meta.config.allowLoginWith || 'username-email';
|
||||||
|
req.body.username = req.body.username.trim();
|
||||||
|
|
||||||
if (req.body.username && utils.isEmailValid(req.body.username) && loginWith.includes('email')) {
|
if (req.body.username && utils.isEmailValid(req.body.username) && loginWith.includes('email')) {
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
|
|||||||
Reference in New Issue
Block a user