Commits

Elisée Maurer committed dd6fec6

Don't make it so easy for people to crash the server

Comments (0)

Files changed (1)

     panache.protocol.clients[client.sessionId] = client;
     
     client.on( 'message', function(data){
+        if( ! ( data instanceof Object ) )
+        {
+            client.connection.end();
+        }
+        else
         if( 'user' in client )
         {
             // Client is authenticated