fix broken ACP login, closes #5156

This commit is contained in:
Julian Lam
2016-10-25 17:10:33 -04:00
parent 0590a4f2cf
commit 4b5c98fb21

View File

@@ -104,7 +104,7 @@ Controllers.login = function (req, res, next) {
var registrationType = meta.config.registrationType || 'normal';
var allowLoginWith = (meta.config.allowLoginWith || 'username-email');
var returnTo = req.headers['x-return-to'].replace(nconf.get('url'), '');
var returnTo = (req.headers['x-return-to'] || '').replace(nconf.get('url'), '');
var errorText;
if (req.query.error === 'csrf-invalid') {