Browse Source

improve password auth config enable check

master
filesite 3 months ago
parent
commit
4c05b9888a
  1. 4
      plugins/Common.php
  2. 2
      themes/beauty/views/site/index.php

4
plugins/Common.php

@ -650,7 +650,7 @@ Class Common {
} }
$authConfig = FSC::$app['config']['password_auth']; $authConfig = FSC::$app['config']['password_auth'];
if (empty($authConfig['enable'])) { if (empty($authConfig['enable']) || $authConfig['enable'] === 'false') {
return true; return true;
} }
@ -674,7 +674,7 @@ Class Common {
} }
$authConfig = FSC::$app['config']['password_auth']; $authConfig = FSC::$app['config']['password_auth'];
if (empty($authConfig['enable'])) { if (empty($authConfig['enable']) || $authConfig['enable'] === 'false') {
return true; return true;
} }

2
themes/beauty/views/site/index.php

@ -200,7 +200,7 @@ eof;
//判断是否需要加密访问的目录 //判断是否需要加密访问的目录
$lockIcon = ''; $lockIcon = '';
if (!empty($authConfig['enable']) && !empty($authConfig['allow'][$dir['directory']])) { if (!empty($authConfig['enable']) && $authConfig['enable'] !== 'false' && !empty($authConfig['allow'][$dir['directory']])) {
$lockIcon = <<<eof $lockIcon = <<<eof
<div class="locked_dir"><img src="/img/beauty/lock2-fill.svg" alt="加密目录" width="30"></div> <div class="locked_dir"><img src="/img/beauty/lock2-fill.svg" alt="加密目录" width="30"></div>
eof; eof;

Loading…
Cancel
Save