1.优化ws返回参数不包含敏感字段user_id等
This commit is contained in:
@@ -126,9 +126,7 @@ class GameWebSocketServer
|
||||
|
||||
GameWebSocketDispatcher::sendDirect($connection, 'ws.connected', [
|
||||
'message' => 'WebSocket connected',
|
||||
'connection_id' => $connection->id,
|
||||
'mode' => $auth['mode'],
|
||||
'user_id' => $auth['user_id'],
|
||||
'server_time' => time(),
|
||||
'heartbeat_interval' => 30,
|
||||
'idle_timeout' => self::HEARTBEAT_IDLE_SECONDS,
|
||||
@@ -286,7 +284,7 @@ class GameWebSocketServer
|
||||
$payload = json_encode([
|
||||
'event' => 'admin.live.snapshot',
|
||||
'topic' => 'admin.live.snapshot',
|
||||
'data' => $snapshot,
|
||||
'data' => GameWebSocketPayloadHelper::sanitizeOutboundData($snapshot),
|
||||
'server_time' => time(),
|
||||
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
if (!is_string($payload) || $payload === '') {
|
||||
|
||||
Reference in New Issue
Block a user