fix security issue

This commit is contained in:
王劲鹏 2022-10-17 17:13:43 +08:00 committed by osborn
parent d8615b2f9a
commit 0a305b3104
2 changed files with 2 additions and 0 deletions

View File

@ -325,6 +325,7 @@ public class DoricWebShellJSExecutor implements IDoricJSE {
webView = new WebView(context.getApplicationContext()); webView = new WebView(context.getApplicationContext());
WebSettings webSettings = webView.getSettings(); WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true); webSettings.setJavaScriptEnabled(true);
webSettings.setSavePassword(false);
webView.setWebChromeClient(new DoricWebChromeClient()); webView.setWebChromeClient(new DoricWebChromeClient());
webView.setWebViewClient(new DoricWebViewClient()); webView.setWebViewClient(new DoricWebViewClient());
WebViewCallback webViewCallback = new WebViewCallback(); WebViewCallback webViewCallback = new WebViewCallback();

View File

@ -223,6 +223,7 @@ public class DoricWebViewJSExecutor implements IDoricJSE {
webView = new WebView(context.getApplicationContext()); webView = new WebView(context.getApplicationContext());
WebSettings webSettings = webView.getSettings(); WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true); webSettings.setJavaScriptEnabled(true);
webSettings.setSavePassword(false);
webView.setWebChromeClient(new DoricWebChromeClient()); webView.setWebChromeClient(new DoricWebChromeClient());
webView.loadUrl("about:blank"); webView.loadUrl("about:blank");
WebViewCallback webViewCallback = new WebViewCallback(); WebViewCallback webViewCallback = new WebViewCallback();