Merge pull request #5212 from stuwil/fix-relative-path-login-redirect

Replace only base URL in login return URL, fixes #5205
This commit is contained in:
Barış Soner Uşaklı
2016-11-18 09:27:23 +02:00
committed by GitHub

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('base_url'), '');
var errorText;
if (req.query.error === 'csrf-invalid') {