From ea16e780927c1d07cd7e907108fd7acf8cefc49d Mon Sep 17 00:00:00 2001 From: Clubs Date: Tue, 29 Sep 2026 20:02:13 -0500 Subject: [PATCH] fix: ensure that registration is enabled before giving tokens from `!admin token issue` --- src/admin/token/commands.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/admin/token/commands.rs b/src/admin/token/commands.rs index b33542fc1..a3ddeff49 100644 --- a/src/admin/token/commands.rs +++ b/src/admin/token/commands.rs @@ -4,6 +4,9 @@ impl crate::Context<'_> { pub(super) async fn issue_registration_token(&self, expires: super::TokenExpires) -> Result { + if !self.services.config.allow_registration { + return Err!("Registration has been disabled on this homeserver."); + } let expires = { if expires.immortal { None