dont allow GetRemotePdu server to be ourselves

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-14 01:44:35 -04:00 committed by June
parent b0bee8f6ae
commit 935f83af98

View file

@ -1971,6 +1971,13 @@ impl Service {
));
}
if server == services().globals.server_name() {
return Ok(RoomMessageEventContent::text_plain(
"Not allowed to send federation requests to ourselves. Please use `get-pdu` for fetching \
local PDUs.",
));
}
// TODO: use Futures as some requests may take a while so we dont block the
// admin room
match services()