add some m.room.member checks on putting direct state events

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2025-01-02 18:16:00 -05:00
commit a5d70f7356
No known key found for this signature in database
6 changed files with 117 additions and 60 deletions

View file

@ -68,7 +68,7 @@ pub(super) async fn handle_outlier_pdu<'a>(
let incoming_pdu = serde_json::from_value::<PduEvent>(
serde_json::to_value(&val).expect("CanonicalJsonObj is a valid JsonValue"),
)
.map_err(|_| Error::bad_database("Event is not a valid PDU."))?;
.map_err(|e| err!(Request(BadJson(debug_warn!("Event is not a valid PDU: {e}")))))?;
check_room_id(room_id, &incoming_pdu)?;