mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-27 17:16:14 +01:00 
			
		
		
		
	fix: #9378, crash on verifyToken if API Token settings not saved (null case error)
This commit is contained in:
		| @@ -51,7 +51,7 @@ Auth.getLoginStrategies = function () { | ||||
| }; | ||||
|  | ||||
| Auth.verifyToken = async function (token, done) { | ||||
| 	let { tokens } = await meta.settings.get('core.api'); | ||||
| 	let { tokens = [] } = await meta.settings.get('core.api'); | ||||
| 	tokens = tokens.reduce((memo, cur) => { | ||||
| 		memo[cur.token] = cur.uid; | ||||
| 		return memo; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user