收紧媒体导出载荷边界
将图片和音频导出载荷预校验提升到共享 HostBridge 契约 让 H5 facade 按共享媒体导出边界归一化文件名、MIME 和 base64 载荷 保留 Expo 与 Tauri 壳对真实字节和 MIME 的二次校验 增加媒体导出载荷测试和三端壳总门禁反查 同步宿主壳协议文档和共享决策记录
This commit is contained in:
@@ -1060,6 +1060,30 @@ function assertH5HostBridgePayloadBoundaries() {
|
||||
'H5 HostBridge facade must normalize share.open payloads with the shared share boundary',
|
||||
);
|
||||
}
|
||||
if (
|
||||
!h5HostBridgeSource.includes(
|
||||
'const normalizedPayload = normalizeHostBridgeExportImagePayload(params);',
|
||||
) ||
|
||||
!h5HostBridgeSource.includes(
|
||||
"'file.exportImage',\n normalizedPayload,",
|
||||
)
|
||||
) {
|
||||
throw new Error(
|
||||
'H5 HostBridge facade must normalize file.exportImage payloads with the shared image export boundary',
|
||||
);
|
||||
}
|
||||
if (
|
||||
!h5HostBridgeSource.includes(
|
||||
'const normalizedPayload = normalizeHostBridgeExportAudioPayload(params);',
|
||||
) ||
|
||||
!h5HostBridgeSource.includes(
|
||||
"'file.exportAudio',\n normalizedPayload,",
|
||||
)
|
||||
) {
|
||||
throw new Error(
|
||||
'H5 HostBridge facade must normalize file.exportAudio payloads with the shared audio export boundary',
|
||||
);
|
||||
}
|
||||
if (
|
||||
!h5HostBridgeSource.includes(
|
||||
'const clipboardText = normalizeHostBridgeClipboardText(text);',
|
||||
|
||||
Reference in New Issue
Block a user