Sar*_*mar 6 android android-security google-play-console android-vitals
Google Play 预发布报告安全漏洞
您的应用程序的网络安全配置允许所有域的明文流量。这可能允许窃听者拦截您的应用程序发送的数据。如果该数据敏感或用户可识别,则可能会影响用户的隐私。
考虑通过将cleartextTrafficPermissed标志设置为 false 或为特定域添加加密策略来仅允许加密流量。了解更多
网络安全配置.xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system"/>
</trust-anchors>
</base-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">127.0.0.1</domain>
</domain-config>
</network-security-config>
Run Code Online (Sandbox Code Playgroud)
AndroidManifest.xml
<application
android:name="com.example.MyActivity"
android:allowBackup="false"
tools:replace="allowBackup"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@style/AppTheme"
android:hardwareAccelerated="true"
android:resizeableActivity="false"
android:networkSecurityConfig="@xml/network_security_config">
Run Code Online (Sandbox Code Playgroud)
我的疑问是,如果我将自己的域名域配置设置为cleartextTrafficPermission =“true”,例如
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">http://my-domain.com</domain>
</domain-config>
Run Code Online (Sandbox Code Playgroud)
下面的配置清除了Google Play安全漏洞
笔记:
<base-config cleartextTrafficPermitted="false">
<trust-anchors>
<certificates src="system"/>
</trust-anchors>
</base-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">myowndomain.com</domain>
</domain-config>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6483 次 |
| 最近记录: |