🔒 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:
M57 authored and GitHub committed 2026-08-04 18:17:25 +03:00
1 parent 0724d0104d
commit af6fd9b346
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)
}