This commit is contained in:
Felix Ableitner 2025-01-13 15:34:06 +01:00
parent 531d4264cd
commit ac094086cd

View file

@ -208,7 +208,7 @@ impl<T: Clone> FederationConfig<T> {
// It is valid but uncommon for domains to end with `.` char. Drop this so it cant be used
// to bypass domain blocklist. Avoid cloning url in common case.
if domain.ends_with(".") {
if domain.ends_with('.') {
let mut url = url.clone();
let domain = &domain[0..domain.len() - 1];
url.set_host(Some(domain))?;