收口原生壳剪贴板读取边界
H5 HostBridge 读取剪贴板时将畸形原生返回统一收口为 false 补充原生 App 剪贴板读取归一化回归测试 原生壳门禁反查 clipboard.readText 返回值必须经过共享剪贴板边界
This commit is contained in:
@@ -1165,6 +1165,21 @@ function assertH5HostBridgePayloadBoundaries() {
|
||||
'H5 HostBridge facade must normalize clipboard.writeText payloads with the shared clipboard boundary',
|
||||
);
|
||||
}
|
||||
if (
|
||||
!h5HostBridgeSource.includes(
|
||||
'const clipboardText = normalizeHostBridgeClipboardText(',
|
||||
) ||
|
||||
!h5HostBridgeSource.includes(
|
||||
"await requestNativeAppHostBridge<ClipboardReadTextResult>(\n 'clipboard.readText',",
|
||||
) ||
|
||||
!h5HostBridgeSource.includes(
|
||||
'return clipboardText ?? false;',
|
||||
)
|
||||
) {
|
||||
throw new Error(
|
||||
'H5 HostBridge facade must normalize clipboard.readText results with the shared clipboard boundary',
|
||||
);
|
||||
}
|
||||
if (
|
||||
!h5HostBridgeSource.includes(
|
||||
'const style = normalizeHostBridgeHapticsImpactStyle(params.style);',
|
||||
|
||||
Reference in New Issue
Block a user