From c17187777f5f3bb06183ce423d990bc1c1061929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20K=C3=B6sters?= Date: Mon, 10 Jul 2023 16:26:36 +0200 Subject: fix: never try federation with self --- src/api/server_server.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/api/server_server.rs b/src/api/server_server.rs index adb5f1f..0177f2a 100644 --- a/src/api/server_server.rs +++ b/src/api/server_server.rs @@ -123,6 +123,12 @@ where return Err(Error::bad_config("Federation is disabled.")); } + if destination == services().globals.server_name() { + return Err(Error::bad_config( + "Won't send federation request to ourselves", + )); + } + debug!("Preparing to send request to {destination}"); let mut write_destination_to_cache = false; -- cgit v1.2.3