Remove dead code

These check the origin which is already checked in router auth
This commit is contained in:
dasha_uwu authored and Jason Volk committed 2026-01-19 00:53:33 +00:00
1 parent 2f4d3c2851
commit 3a9446bb9c
5 files changed
+2 -84

No files matched your search

-15
View File
@@ -21,7 +21,6 @@ use tuwunel_core::{
matrix::{Event, PduCount, PduEvent, event::gen_event_id},
utils,
utils::hash::sha256,
warn,
};
use crate::Ruma;
@@ -60,20 +59,6 @@ pub(crate) async fn create_invite_route(
return Err!(Request(Forbidden("Server is banned on this homeserver.")));
}
if services
.config
.forbidden_remote_server_names
.is_match(body.origin().host())
{
warn!(
"Received federated/remote invite from banned server {} for room ID {}. Rejecting.",
body.origin(),
body.room_id
);
return Err!(Request(Forbidden("Server is banned on this homeserver.")));
}
let mut signed_event = utils::to_canonical_object(&body.event)
.map_err(|_| err!(Request(InvalidParam("Invite event is invalid."))))?;