c# - SignalR secure message delivery -


so, got security related question.

// code sent client server var hub = $.connection.hubname;         hub.name = "useridfromdatabase"; 

if malicious user write simple html page same code, receive messages sent original user?

(actually want organize chat between registered users why name/clientid should provided server side).

thanks

upd:

i created related issue @ project portal: https://github.com/signalr/signalr/issues/432

the short answer no, depends on server side code doing.

signalr provide unique connectionid every connection hub. long use connectionid route messages, , not build own routing mechanism based on values provided client should fine.

in example provide, when user connects unique connectionid. though second user able alter values of client side code , mimick first user, connectionid provided signalr different.

example on how call methods on specific clients from https://github.com/signalr/signalr/wiki/hubs

public class myhub : hub {      public void send(string data)      {          // invoke method on calling client          caller.addmessage(data);           // similar above, more verbose way          clients[context.connectionid].addmessage(data);      } } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -