Add additional check for invalid megolm sessions
This commit is contained in:
parent
d46f916cc1
commit
4dd5f9841d
3 changed files with 6 additions and 2 deletions
|
|
@ -1129,6 +1129,10 @@ decryptEvent(const MegolmSessionIndex &index,
|
|||
std::string msg_str;
|
||||
try {
|
||||
auto session = cache::client()->getInboundMegolmSession(index);
|
||||
if (!session) {
|
||||
return {DecryptionErrorCode::MissingSession, std::nullopt, std::nullopt};
|
||||
}
|
||||
|
||||
auto sessionData =
|
||||
cache::client()->getMegolmSessionData(index).value_or(GroupSessionData{});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue