You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, any client can send the data to any pacman. Client 2 has access to the playerId of pacman 1 . Client 2 can change the direction of client-1's pacman by sending its playerId through updateNewDirection({playerId, direction})
An approaches to solve this issue:
Send the user JWT instead of playerId given to the server with updateNewDirection(). On the server that JWT maps to the correct playerId and updates that pacman direction. Now, the client 2 cannot update client 1 pacman.
Server will need to store the 2 user's JWT for each room.
Currently, any client can send the data to any pacman. Client 2 has access to the
playerId
of pacman 1 . Client 2 can change the direction of client-1's pacman by sending itsplayerId
throughupdateNewDirection({playerId, direction})
An approaches to solve this issue:
Send the user JWT instead of
playerId
given to the server withupdateNewDirection()
. On the server that JWT maps to the correct playerId and updates that pacman direction. Now, the client 2 cannot update client 1 pacman.Server will need to store the 2 user's JWT for each room.
Comments? @Shalinit3
The text was updated successfully, but these errors were encountered: