Merge branch 'pr452'

This commit is contained in:
Tomas Bures 2018-08-05 17:37:01 +05:30
commit 198a67bbd2

View file

@ -61,6 +61,7 @@ module.exports.login = (req, res, next) => {
return next(err);
}
if (!user) {
log.warn('auth', `[client ${req.ip}] authentication failure`);
req.flash('danger', info && info.message || _('Failed to authenticate user'));
return res.redirect('/users/login' + (req.body.next ? '?next=' + encodeURIComponent(req.body.next) : ''));
}