Skip to content

Node.js based forum software built for the modern web

fix: incorrect returnTo set in registerComplete

Julian Lamf972f752027b
diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js
index 31b59eee93..5901cf5ead 100644
--- a/src/controllers/authentication.js
+++ b/src/controllers/authentication.js
@@ -173,7 +173,7 @@ authenticationController.registerComplete = function (req, res, next) {
return res.redirect(nconf.get('relative_path') + '/?register=' + encodeURIComponent(data.message));
}
if (req.session.returnTo) {
- res.redirect(req.session.returnTo);
+ res.redirect(nconf.get('relative_path') + req.session.returnTo);
} else {
res.redirect(nconf.get('relative_path') + '/');
}