fix two crashes

v1.18.x
Ben Lubar 9 years ago
parent e556ae93ea
commit 3c607f2612

@ -41,7 +41,7 @@ helpers.redirect = function(res, url) {
if (res.locals.isAPI) {
res.status(308).json(url);
} else {
res.redirect(nconf.get('relative_path') + url);
res.redirect(nconf.get('relative_path') + encodeURI(url));
}
};

@ -13,7 +13,7 @@ module.exports = function(middleware) {
req = this.req,
defaultFn = function(err, str){
if (err) {
return req.next(err);
return next(err);
}
self.send(str);

Loading…
Cancel
Save