fix an auth rule not applying correctly

This commit is contained in:
nexy7574 2025-06-07 00:46:55 +01:00
parent e8d823a653
commit eda20ac4f5
No known key found for this signature in database
GPG key ID: 0FA334385D0B689F

View file

@ -255,6 +255,16 @@ where
}, },
| Some(e) => e, | Some(e) => e,
}; };
// just re-check 1.2 to work around a bug
let Some(room_id_server_name) = incoming_event.room_id().server_name() else {
warn!("room ID has no servername");
return Ok(false);
};
if room_id_server_name != sender.server_name() {
warn!("servername of room ID does not match servername of m.room.create sender");
return Ok(false);
}
// 3. If event does not have m.room.create in auth_events reject // 3. If event does not have m.room.create in auth_events reject
if !incoming_event if !incoming_event