mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-07 18:01:51 +02:00
fix: closes #14151, handle null req.body
This commit is contained in:
@@ -221,6 +221,7 @@ authenticationController.login = async (req, res, next) => {
|
||||
}
|
||||
|
||||
const loginWith = meta.config.allowLoginWith || 'username-email';
|
||||
req.body = req.body || {};
|
||||
req.body.username = String(req.body.username).trim();
|
||||
const errorHandler = res.locals.noScriptErrors || helpers.noScriptErrors;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user