[英]Your app(s) are using a WebView that is vulnerable to cross-app scripting Android PlayStore Warning
In whistleIt we load static url in webview and handle notification and other things but in last 2 versions we receive warning在 whistleIt 中,我们在 webview 中加载静态 url 并处理通知和其他事情,但在最后 2 个版本中我们收到警告
Your app(s) are using a WebView that is vulnerable to cross-app scripting
您的应用程序正在使用易受跨应用程序脚本攻击的 WebView
We are not using android:exported=”true“
in our activity also i am using below code in Webview activity but still getting warning email.我们没有在我们的活动中使用
android:exported=”true“
我也在 Webview 活动中使用以下代码,但仍然收到警告电子邮件。
<meta-data android:name="android.webkit.WebView.EnableSafeBrowsing"
android:value="true" />
what should i do now so our warning will get removed?我现在应该怎么做才能消除我们的警告?
Please add this line of code in your project manifest.xml请在您的项目 manifest.xml 中添加这行代码
<meta-data android:name="android.webkit.WebView.EnableSafeBrowsing"
android:value="true" />
according to https://support.google.com/faqs/answer/9084685?hl=en-GB根据https://support.google.com/faqs/answer/9084685?hl=en-GB
you can do 2 things你可以做两件事
1 Ensure that affected activities are not exported 1 确保不出口受影响的活动
Find any Activities with affected WebViews.
查找任何具有受影响 WebView 的活动。 If these Activities do not need to take Intents from other apps you can set android:exported=false for the Activities in your Manifest.
如果这些活动不需要从其他应用程序获取意图,您可以为清单中的活动设置 android:exported=false。 This ensures that malicious apps cannot send harmful inputs to any WebViews in these activities.
这可确保恶意应用程序无法向这些活动中的任何 WebView 发送有害输入。
2 Protect WebViews in exported activities 2 在导出的活动中保护 WebView
If you want to set an Activity with an affected WebView as exported then we recommend that you make the following changes:
如果要将具有受影响 WebView 的 Activity 设置为导出,我们建议您进行以下更改:
1 Protect calls to evaluateJavascript and loadUrl
1 保护对evaluateJavascript 和loadUrl 的调用
Ensure that parameters to evaluateJavascript are always trusted.
确保用于评估Javascript 的参数始终受信任。 Calling evaluateJavascript using unsanitised input from untrusted intents lets attackers execute harmful scripts in the affected WebView.
使用来自不受信任意图的未经处理的输入调用evaluateJavascript 允许攻击者在受影响的WebView 中执行有害脚本。 Similarly, calling loadUrl with unsanitised input containing javascript: scheme URLs lets attackers execute harmful scripts.
类似地,使用包含 javascript: scheme URL 的未经处理的输入调用 loadUrl 可以让攻击者执行有害脚本。
2 Prevent unsafe file loads
2 防止不安全的文件加载
Ensure that affected WebViews cannot load the cookie database.
stored in the cookies database will load and execute, which can steal session information.确保受影响的 WebView 无法加载 cookie 数据库。 WebViews that load unsanitised file:// URLs from untrusted intents can be attacked by malicious apps in two steps.
从不受信任的意图加载未经处理的 file:// URL 的 WebView 可以通过两个步骤受到恶意应用程序的攻击。 First step: a malicious web page can write tags into the cookies database.
第一步:恶意网页可以将标签写入cookies数据库。 Second step: this modified cookies database file can be loaded if a malicious app sends an intent with a file:// URL pointing to your WebView cookies database, or if the malicious web page itself redirects your WebView to the file URL.
第二步:如果恶意应用发送带有指向您的 WebView cookie 数据库的 file:// URL 的意图,或者如果恶意网页本身将您的 WebView 重定向到文件 URL,则可以加载此修改后的 cookie 数据库文件。 The malicious
恶意的
存储在cookies数据库中会加载并执行,可以窃取会话信息。
You can ensure that affected WebViews cannot load the WebView cookies database in three ways.您可以通过三种方式确保受影响的 WebView 无法加载 WebView cookie 数据库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.