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 <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-28 18:21:31 -04:00
parent d095b89516
commit c8e9591bdb

View file

@ -50,24 +50,6 @@ where
let url = reqwest_request.url().clone(); 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<IPAddress> = 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() let mut response = match services()
.globals .globals
.client .client