Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01bfd04f authored by Pinyao Ting's avatar Pinyao Ting
Browse files

Validate userId when publishing shortcuts

Bug: 288110451
Test: manual
Change-Id: Idbde676f871db83825155730e3714f3727e25762
Merged-In: Idbde676f871db83825155730e3714f3727e25762
parent 94189125
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -1641,6 +1641,10 @@ public class ShortcutService extends IShortcutService.Stub {
            android.util.EventLog.writeEvent(0x534e4554, "109824443", -1, "");
            android.util.EventLog.writeEvent(0x534e4554, "109824443", -1, "");
            throw new SecurityException("Shortcut package name mismatch");
            throw new SecurityException("Shortcut package name mismatch");
        }
        }
        final int callingUid = injectBinderCallingUid();
        if (UserHandle.getUserId(callingUid) != si.getUserId()) {
            throw new SecurityException("User-ID in shortcut doesn't match the caller");
        }
    }
    }


    private void verifyShortcutInfoPackages(
    private void verifyShortcutInfoPackages(