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,
|
senderKey = sessionInfoPair.second,
|
||||||
sharedHistory = true
|
sharedHistory = true
|
||||||
)
|
)
|
||||||
|
}?.filter { inboundGroupSession ->
|
||||||
|
// Prevent injecting a forged encrypted message and using session_id/sender_key of another room.
|
||||||
|
inboundGroupSession.roomId == roomId
|
||||||
}?.forEach { inboundGroupSession ->
|
}?.forEach { inboundGroupSession ->
|
||||||
// Share the sharable session to userId with deviceId
|
// Share the sharable session to userId with deviceId
|
||||||
val exportedKeys = inboundGroupSession.exportKeys(sharedHistory = true)
|
val exportedKeys = inboundGroupSession.exportKeys(sharedHistory = true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user