fix: ensure that registration is enabled before giving tokens from !admin token issue

This commit is contained in:
Clubs
2026-10-03 15:37:58 +00:00
committed by Ellis Git
parent 56c2d8d901
commit ea16e78092
+3
View File
@@ -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