From 4c05b9888a006e508d447815b1029993bf8dd3e9 Mon Sep 17 00:00:00 2001 From: filesite Date: Fri, 6 Sep 2024 17:21:43 +0800 Subject: [PATCH] improve password auth config enable check --- plugins/Common.php | 4 ++-- themes/beauty/views/site/index.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Common.php b/plugins/Common.php index 86c2f10..23869fb 100644 --- a/plugins/Common.php +++ b/plugins/Common.php @@ -650,7 +650,7 @@ Class Common { } $authConfig = FSC::$app['config']['password_auth']; - if (empty($authConfig['enable'])) { + if (empty($authConfig['enable']) || $authConfig['enable'] === 'false') { return true; } @@ -674,7 +674,7 @@ Class Common { } $authConfig = FSC::$app['config']['password_auth']; - if (empty($authConfig['enable'])) { + if (empty($authConfig['enable']) || $authConfig['enable'] === 'false') { return true; } diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 632bf16..9d07a76 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -200,7 +200,7 @@ eof; //判断是否需要加密访问的目录 $lockIcon = ''; - if (!empty($authConfig['enable']) && !empty($authConfig['allow'][$dir['directory']])) { + if (!empty($authConfig['enable']) && $authConfig['enable'] !== 'false' && !empty($authConfig['allow'][$dir['directory']])) { $lockIcon = <<加密目录 eof;