mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Prevent injecting a forged encrypted message and using session_id/sender_key of another room.
This commit is contained in:
parent
28a3ae264c
commit
d6358dcb16
@ -1354,6 +1354,9 @@ internal class DefaultCryptoService @Inject constructor(
|
||||
senderKey = sessionInfoPair.second,
|
||||
sharedHistory = true
|
||||
)
|
||||
}?.filter { inboundGroupSession ->
|
||||
// Prevent injecting a forged encrypted message and using session_id/sender_key of another room.
|
||||
inboundGroupSession.roomId == roomId
|
||||
}?.forEach { inboundGroupSession ->
|
||||
// Share the sharable session to userId with deviceId
|
||||
val exportedKeys = inboundGroupSession.exportKeys(sharedHistory = true)
|
||||
|
Loading…
Reference in New Issue
Block a user