🔒 Secure RemoteInput PendingIntent boundaries (#800)
Added `setPackage(packageName)` to the explicitly defined reply intent before wrapping it in the mutable PendingIntent for remote input. RemoteInput intents strictly require `FLAG_MUTABLE` so the Android OS can append the user's text reply. To use `FLAG_MUTABLE` securely and prevent unintentional component delivery, explicit component boundaries (like `setPackage`) must be defined.
This commit is contained in:
1 file changed
+1
@@ -150,6 +150,7 @@ class ChatNotificationService : Service() {
|
||||
val replyIntent =
|
||||
Intent(this, NotificationReplyReceiver::class.java).apply {
|
||||
action = "$packageName.ACTION_NOTIFICATION_REPLY"
|
||||
setPackage(packageName)
|
||||
putExtra(NotificationReplyReceiver.EXTRA_SESSION_ID, sessionId)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user