Explorar o código

[WebsocketController] reset the client context before (re)populating it

Co-Authored-By: Brian Gough <brian.gough@overleaf.com>
Jakob Ackermann %!s(int64=6) %!d(string=hai) anos
pai
achega
205efa8812
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      services/real-time/app/coffee/WebsocketController.coffee

+ 1 - 0
services/real-time/app/coffee/WebsocketController.coffee

@@ -33,6 +33,7 @@ module.exports = WebsocketController =
 				logger.warn {err, project_id, user_id, client_id: client.id}, "user is not authorized to join project"
 				return callback(err)
 
+			client.ol_context = {}
 			client.ol_context["privilege_level"] = privilegeLevel
 			client.ol_context["user_id"] = user_id
 			client.ol_context["project_id"] = project_id