mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	fix: bug where interstitial errors were not properly passed to the front-end via req.flash
This commit is contained in:
		| @@ -183,7 +183,7 @@ authenticationController.registerComplete = function (req, res, next) { | |||||||
| 		const results = await Promise.allSettled(callbacks.map(async (cb) => { | 		const results = await Promise.allSettled(callbacks.map(async (cb) => { | ||||||
| 			await cb(req.session.registration, req.body); | 			await cb(req.session.registration, req.body); | ||||||
| 		})); | 		})); | ||||||
| 		const errors = results.map(result => result.status === 'rejected').filter(Boolean); | 		const errors = results.map(result => result.status === 'rejected' && result.reason && result.reason.message).filter(Boolean); | ||||||
| 		if (errors.length) { | 		if (errors.length) { | ||||||
| 			req.flash('errors', errors); | 			req.flash('errors', errors); | ||||||
| 			return res.redirect(`${nconf.get('relative_path')}/register/complete`); | 			return res.redirect(`${nconf.get('relative_path')}/register/complete`); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user