I've been searching for 3 days, how to correctly validate user information in nodejs socket.io server, only thing that gets passed to server, are cookies, like PHPSESSID, etc. if needed.
My question is: what if user changes his PHPSESSID cookie value to something else, like friends cookie value, then reinitialize socket server connection, all the traffic that supposed to be sent to my friend will be sent to me instead. (user to user private communication)
Even if i use memcached server to store sessions, there is only one thing that validates users, that is session id again, how should i validate user session ?
I cant change session store location, because i am using PHP Wave framework. Are there alternatives to socket.io, but more secure?