gpt4 book ai didi

android - 导出的内容提供者可以提供对潜在敏感数据的访问

转载 作者:IT王子 更新时间:2023-10-28 23:34:49 28 4
gpt4 key购买 nike

我正在使用 ContentProvider在我的android应用程序之间共享数据库的应用程序。为了共享数据库,我需要在 AndroidManifest.xml 中添加提供者访问权限如下:

<provider
android:name="Contentprovider"
android:authorities="umb.con.apps.vid" />

我已成功添加并实现,但 <provider/> 中显示警告消息像这样的标签“导出的内容提供者可以提供对潜在敏感数据的访问”。以后会不会造成安全问题?

最佳答案

如果您只想从应用内部访问内容提供程序,只需添加

android:exported="false"

进入 list 中的节点。

来自 doc :

false: The provider is not available to other applications. Set android:exported="false" to limit access to the provider to your applications. Only applications that have the same user ID (UID) as the provider will have access to it.

另一方面,如果您确实想将您的数据暴露给其他应用您的数据存储中也有敏感数据,请记住您可以拥有多个内容提供商,因此只公开“公开”的。

关于android - 导出的内容提供者可以提供对潜在敏感数据的访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13448480/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com