From c8e9591bdba8e938d1cdcfb54aa014d0414536bf Mon Sep 17 00:00:00 2001 From: strawberry Date: Thu, 28 Mar 2024 18:21:31 -0400 Subject: [PATCH] revert checking appserice destination against ip_range_denylist this is the url field in the appservice registration file, this is almost always localhost and the admin should be vetting the appservice registration yaml file before registering it anyways. Signed-off-by: strawberry --- src/api/appservice_server.rs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/api/appservice_server.rs b/src/api/appservice_server.rs index ddc755b0..688fea27 100644 --- a/src/api/appservice_server.rs +++ b/src/api/appservice_server.rs @@ -50,24 +50,6 @@ where let url = reqwest_request.url().clone(); - if let Some(url_host) = url.host_str() { - debug!("Checking request URL for IP"); - if let Ok(ip) = IPAddress::parse(url_host) { - let cidr_ranges_s = services().globals.ip_range_denylist().to_vec(); - let mut cidr_ranges: Vec = Vec::new(); - - for cidr in cidr_ranges_s { - cidr_ranges.push(IPAddress::parse(cidr).expect("we checked this at startup")); - } - - for cidr in cidr_ranges { - if cidr.includes(&ip) { - return Some(Err(Error::BadServerResponse("Not allowed to send requests to this IP"))); - } - } - } - } - let mut response = match services() .globals .client