收口H5原生分享目标同步边界
H5 原生 App 分享目标同步前复用共享分享 payload 边界 H5 HostBridge 测试覆盖无效分享目标不发送原生请求 原生壳门禁反查 share.setTarget 发送前校验
This commit is contained in:
@@ -1093,6 +1093,17 @@ function assertH5HostBridgePayloadBoundaries() {
|
||||
'H5 HostBridge facade must normalize share.open payloads with the shared share boundary',
|
||||
);
|
||||
}
|
||||
if (
|
||||
!h5HostBridgeSource.includes(
|
||||
'const normalizedPayload = normalizeHostBridgeShareOpenPayload(message);',
|
||||
) ||
|
||||
!h5HostBridgeSource.includes("normalizedPayload.status !== 'valid'") ||
|
||||
!h5HostBridgeSource.includes("'share.setTarget', {\n target: message,")
|
||||
) {
|
||||
throw new Error(
|
||||
'H5 HostBridge facade must validate native share.setTarget payloads before sending them to native shells',
|
||||
);
|
||||
}
|
||||
if (
|
||||
!h5HostBridgeSource.includes(
|
||||
'const normalizedPayload = normalizeHostBridgeExportTextPayload(params);',
|
||||
|
||||
Reference in New Issue
Block a user