From 68eecf71af0064e7aaba66bd07cc777a5bb0258d Mon Sep 17 00:00:00 2001 From: Nyaaori <+@nyaaori.cat> Date: Wed, 28 Sep 2022 11:45:41 +0200 Subject: [PATCH] state-res: Fix third party invite validation --- crates/ruma-state-res/CHANGELOG.md | 6 ++++++ crates/ruma-state-res/src/event_auth.rs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/crates/ruma-state-res/CHANGELOG.md b/crates/ruma-state-res/CHANGELOG.md index 88e64c66..40e5efc1 100644 --- a/crates/ruma-state-res/CHANGELOG.md +++ b/crates/ruma-state-res/CHANGELOG.md @@ -1,5 +1,11 @@ # [unreleased] +Bug fixes: + +* Fix third party invite event authorization. The event was not allowed even + after passing all the required checks, so it could fail further down the + algorithm. + # 0.8.0 Bug fixes: diff --git a/crates/ruma-state-res/src/event_auth.rs b/crates/ruma-state-res/src/event_auth.rs index bbc07128..e84a4dcb 100644 --- a/crates/ruma-state-res/src/event_auth.rs +++ b/crates/ruma-state-res/src/event_auth.rs @@ -364,6 +364,9 @@ pub fn auth_check( warn!("sender's cannot send invites in this room"); return Ok(false); } + + info!("m.room.third_party_invite event was allowed"); + return Ok(true); } // If the event type's required power level is greater than the sender's power level, reject