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 { @@ -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 { @@ -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;
}

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

@ -200,7 +200,7 @@ eof; @@ -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
<div class="locked_dir"><img src="/img/beauty/lock2-fill.svg" alt="加密目录" width="30"></div>
eof;

Loading…
Cancel
Save