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:
@@ -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<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()
|
||||
.globals
|
||||
.client
|
||||
|
||||
Reference in New Issue
Block a user