Is it secure to send messages between a WebSocket Server and the Client?
An example of sending messages between a (Socket.io) server, is in Node.js:
socket.on("myMessage", function(msg) {
// "msg" is the message being sent
});
Could a user get / change the client-side JavaScript code, and send some kind of bad message to the server? (e.g., SQL injection)
What are the ways of preventing that?
Another example of using PubNub's API for client side chat apps, that does not use a server:
pubnub.addListener({
message: function(msg) {
// "msg" is the message being sent
}
});