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

Commit 63fe378e authored by Pinyao Ting's avatar Pinyao Ting Committed by Automerger Merge Worker
Browse files

Merge "Validate userId when publishing shortcuts" into rvc-dev am: 72aee140...

Merge "Validate userId when publishing shortcuts" into rvc-dev am: 72aee140 am: fedf1c8c am: 4934f58c am: 782e7bc3 am: 4a0b42a7

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24182288



Change-Id: I671f3f0094151896deef83e23b42088c007de388
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 3815edc6 4a0b42a7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1729,6 +1729,10 @@ public class ShortcutService extends IShortcutService.Stub {
            android.util.EventLog.writeEvent(0x534e4554, "109824443", -1, "");
            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(