收紧移动壳WebView安全开关
移动壳 WebView 显式禁用多窗口、文件访问、混合内容、第三方 Cookie 和远程调试 移动壳检查脚本拒绝 WebView 安全开关被放宽 移动壳导航测试补充协议降级、协议相对外域和危险协议拦截 宿主壳方案和共享决策记录移动 WebView 安全边界
This commit is contained in:
@@ -295,6 +295,15 @@ for (const snippet of [
|
||||
'SafeAreaView',
|
||||
'MOBILE_SHELL_SAFE_AREA_EDGES',
|
||||
'resolveMobileShellBaseWebUrl',
|
||||
'javaScriptCanOpenWindowsAutomatically={false}',
|
||||
'mixedContentMode="never"',
|
||||
'allowFileAccess={false}',
|
||||
'allowFileAccessFromFileURLs={false}',
|
||||
'allowUniversalAccessFromFileURLs={false}',
|
||||
'thirdPartyCookiesEnabled={false}',
|
||||
'sharedCookiesEnabled={false}',
|
||||
'webviewDebuggingEnabled={false}',
|
||||
'setSupportMultipleWindows={false}',
|
||||
]) {
|
||||
if (!appSource.includes(snippet)) {
|
||||
throw new Error(`mobile shell App missing ${snippet}`);
|
||||
|
||||
Reference in New Issue
Block a user