mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	fix: #8943, session mismatch modal thrown on login (race condition)
This commit is contained in:
		| @@ -194,7 +194,7 @@ app.cacheBuster = null; | |||||||
| 	}; | 	}; | ||||||
|  |  | ||||||
| 	app.handleInvalidSession = function () { | 	app.handleInvalidSession = function () { | ||||||
| 		if (app.flags._logout) { | 		if (app.flags._login || app.flags._logout) { | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,6 +29,9 @@ define('forum/login', ['jquery-form'], function () { | |||||||
| 					headers: { | 					headers: { | ||||||
| 						'x-csrf-token': config.csrf_token, | 						'x-csrf-token': config.csrf_token, | ||||||
| 					}, | 					}, | ||||||
|  | 					beforeSend: function () { | ||||||
|  | 						app.flags._login = true; | ||||||
|  | 					}, | ||||||
| 					success: function (data) { | 					success: function (data) { | ||||||
| 						$(window).trigger('action:app.loggedIn', data); | 						$(window).trigger('action:app.loggedIn', data); | ||||||
| 						var pathname = utils.urlToLocation(data.next).pathname; | 						var pathname = utils.urlToLocation(data.next).pathname; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user