From ed8ac29cfa2e083390ac579496caeda257a55d61 Mon Sep 17 00:00:00 2001 From: rekushi <1+rekushi@noreply.flipnote.world> Date: Thu, 29 Oct 2026 04:32:45 +0000 Subject: [PATCH] fix(dsi): honour the account registration setting Reject native registration submissions while new accounts are disabled. --- hatenadir/ds/v2-xx/sa.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hatenadir/ds/v2-xx/sa.py b/hatenadir/ds/v2-xx/sa.py index 3ed8233..9ffaf04 100644 --- a/hatenadir/ds/v2-xx/sa.py +++ b/hatenadir/ds/v2-xx/sa.py @@ -39,6 +39,10 @@ class AccountLeaf(resource.Resource): def render_POST(self, request): if self.action not in {"login.kbd", "register.kbd"}: request.setResponseCode(405); return b"" + if self.action == "register.kbd": + from server_config import load_config + if not load_config()["registration_enabled"]: + return dialog(request, "New account registration is currently closed.") value = keyboard_value(request) if ":" not in value: return dialog(request, "Enter username:password")