收口HostBridge请求信封校验

共享契约新增HostBridge method白名单和request id归一规则

Expo与Tauri壳在能力分发前拒绝非法id和未知method

补充两端测试、配置门禁、原生壳方案和共享决策记录
This commit is contained in:
2026-06-18 13:22:27 +08:00
parent 4c4682069b
commit 71b18002d4
9 changed files with 205 additions and 5 deletions
@@ -705,6 +705,12 @@ const requiredMainSnippets = [
'DownloadEvent::Requested { .. } => false',
'.on_download(|_webview, event| should_allow_desktop_webview_download(&event))',
'NewWindowResponse::Deny',
'HOST_BRIDGE_METHODS',
'HOST_BRIDGE_REQUEST_ID_MAX_LENGTH',
'normalize_request_id',
'is_host_bridge_method',
'invalid host bridge request id',
'invalid host bridge method',
'HostBridgeReplayState',
'HostBridgeReplayReservation',
'HOST_BRIDGE_RESPONSE_CACHE_MAX',