谨慎实现PendingIntents

细节

使用PendingIntent,应用程序可以将Intent传递给第二个应用程序,然后可以执行该Intent,就像它是原始应用程序(即具有相同权限)一样。这允许其他应用程序回调原始应用程序的私有组件。外部应用程序(如果是恶意应用)可能会尝试影响目标或数据的完整性。

修复

使用PendingIntents作为私有BroadcastReceivers或Broadcast Activities的延迟回调,并在基础Intent中明确指定组件名称。

参考

results matching ""

    No results matching ""