mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 21:26:50 +00:00
Remove dead code
These check the origin which is already checked in router auth
This commit is contained in:
1 parent
2f4d3c2851
commit
3a9446bb9c
5 files changed
+2
-84
No files matched your search
@@ -270,21 +270,6 @@ pub(crate) async fn create_join_event_v1_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<create_join_event::v1::Request>,
|
||||
) -> Result<create_join_event::v1::Response> {
|
||||
if services
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.is_match(body.origin().host())
|
||||
{
|
||||
warn!(
|
||||
"Server {} tried joining room ID {} through us who has a server name that is \
|
||||
globally forbidden. Rejecting.",
|
||||
body.origin(),
|
||||
&body.room_id,
|
||||
);
|
||||
|
||||
return Err!(Request(Forbidden("Server is banned on this homeserver.")));
|
||||
}
|
||||
|
||||
if let Some(server) = body.room_id.server_name()
|
||||
&& services
|
||||
.config
|
||||
@@ -317,14 +302,6 @@ pub(crate) async fn create_join_event_v2_route(
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<create_join_event::v2::Request>,
|
||||
) -> Result<create_join_event::v2::Response> {
|
||||
if services
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.is_match(body.origin().host())
|
||||
{
|
||||
return Err!(Request(Forbidden("Server is banned on this homeserver.")));
|
||||
}
|
||||
|
||||
if let Some(server) = body.room_id.server_name()
|
||||
&& services
|
||||
.config
|
||||
|
||||
Reference in new issue
Block a user