if (Build.VERSION.SDK_INT <= 16) {
Class<?> clazz = webView.getSettings().getClass();
Method method = clazz.getMethod("setAllowUniversalAccessFromFileURLs", boolean.class);
if (method != null) {
method.invoke(webView.getSettings(), false);
}
}
if (Build.VERSION.SDK_INT <= 16) {
Class<?> clazz = webView.getSettings().getClass();
Method method = clazz.getMethod("setAllowUniversalAccessFromFileURLs", boolean.class);
if (method != null) {
method.invoke(webView.getSettings(), false);
}
}
本文标题:Android平台WebView控件存在跨域访问高危漏洞解决办法
本文链接:https://www.haomeiwen.com/subject/hwconxtx.html
网友评论