|
@@ -96,7 +96,7 @@ PeerServer.prototype._initializeWSS = function() {
|
|
|
case 'LEAVE':
|
|
|
// Clean up if a Peer sends a LEAVE.
|
|
|
if (!message.dst) {
|
|
|
- self._removePeer(message.src);
|
|
|
+ self._removePeer(id);
|
|
|
break;
|
|
|
}
|
|
|
// ICE candidates
|
|
@@ -106,6 +106,8 @@ PeerServer.prototype._initializeWSS = function() {
|
|
|
case 'ANSWER':
|
|
|
// Firefoxism (connectDataConnection ports)
|
|
|
case 'PORT':
|
|
|
+ // Use the ID we know to be correct to prevent spoofing.
|
|
|
+ message.src = id;
|
|
|
self._handleTransmission(message);
|
|
|
break;
|
|
|
default:
|