mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Make mutable PendingIntent explicit
Starting from target SDK U, we will block creation of mutable PendingIntents with implicit Intents because attackers can mutate the Intent object within and launch altered behavior on behalf of victim apps. For more details on the vulnerability, see go/pendingintent-rca. From a quick analysis, we concluded that the PendingIntent here was only destined to the test app/to the app, so it was made explicit. Reviewers, please call out if this is not the case. Bug: 236704164 Test: atest NexusLauncherTests:com.android.quickstep.DigitalWellBeingToastTest Test: atest RequestPinItemTest Change-Id: I81311b0588b7b712c97de6cb016a62bb91c7a77c
This commit is contained in:
@@ -147,7 +147,8 @@ public class RequestPinItemTest extends AbstractLauncherUiTest {
|
||||
|
||||
// Set callback
|
||||
PendingIntent callback = PendingIntent.getBroadcast(mTargetContext, 0,
|
||||
new Intent(mCallbackAction), FLAG_ONE_SHOT | FLAG_MUTABLE);
|
||||
new Intent(mCallbackAction).setPackage(mTargetContext.getPackageName()),
|
||||
FLAG_ONE_SHOT | FLAG_MUTABLE);
|
||||
mTargetContext.sendBroadcast(RequestPinItemActivity.getCommandIntent(
|
||||
RequestPinItemActivity.class, "setCallback").putExtra(
|
||||
RequestPinItemActivity.EXTRA_PARAM + "0", callback));
|
||||
|
||||
Reference in New Issue
Block a user