From 9dae7988fd06b51b0787759130857ef99663a6d2 Mon Sep 17 00:00:00 2001 From: dami Date: Wed, 10 Sep 2025 22:00:51 +0800 Subject: [PATCH] Update firewall.py --- web/utils/firewall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/utils/firewall.py b/web/utils/firewall.py index 0464bebfa..8eed358fb 100644 --- a/web/utils/firewall.py +++ b/web/utils/firewall.py @@ -230,7 +230,7 @@ class Firewall(object): data['pubkey_prohibit_status'] = True # root登陆配置检查 - root_rep = r"PermitRootLogin\s+(\w*)\s*\n" + root_rep = r"^PermitRootLogin\s+(\w*)\s*\n" root_status = re.search(pass_rep, conf) if root_status: if root_status and root_status.groups(0)[0].strip() == 'no':