Merge pull request #31482 from Faless/ws/fix_relay

WebSocketServer now sanitize destination peers.
This commit is contained in:
Rémi Verschelde 2019-08-20 12:48:13 +02:00 committed by GitHub
commit a1aeeb34d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -265,7 +265,10 @@ Error WebSocketMultiplayerPeer::_server_relay(int32_t p_from, int32_t p_to, cons
ERR_FAIL_COND_V(p_to == p_from, FAILED);
return get_peer(p_to)->put_packet(p_buffer, p_buffer_size); // Sending to specific peer
Ref<WebSocketPeer> peer_to = get_peer(p_to);
ERR_FAIL_COND_V(peer_to.is_null(), FAILED);
return peer_to->put_packet(p_buffer, p_buffer_size); // Sending to specific peer
}
}