mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15:58 +01:00 
			
		
		
		
	fix two crashes
This commit is contained in:
		| @@ -41,7 +41,7 @@ helpers.redirect = function(res, url) { | |||||||
| 	if (res.locals.isAPI) { | 	if (res.locals.isAPI) { | ||||||
| 		res.status(308).json(url); | 		res.status(308).json(url); | ||||||
| 	} else { | 	} 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, | 				req = this.req, | ||||||
| 				defaultFn = function(err, str){ | 				defaultFn = function(err, str){ | ||||||
| 					if (err) { | 					if (err) { | ||||||
| 						return req.next(err); | 						return next(err); | ||||||
| 					} | 					} | ||||||
|  |  | ||||||
| 					self.send(str); | 					self.send(str); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user