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
Post a Comment