From 12494b62ed33ebe02061275c6d8b6440cf1bc7b1 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 9 Aug 2021 04:27:25 +0000 Subject: [PATCH] change dontBasicAuth to useBasicAuth --- common.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common.php b/common.php index defc676..f7ead28 100644 --- a/common.php +++ b/common.php @@ -35,7 +35,7 @@ $EnvConfigs = [ 'customCss' => 0b011, 'customTheme' => 0b011, 'theme' => 0b010, - 'dontBasicAuth' => 0b010, + 'useBasicAuth' => 0b010, 'referrer' => 0b011, 'forceHttps' => 0b010, @@ -727,7 +727,7 @@ function comppass($pass) return 2; } if ($_COOKIE['password'] !== '') if ($_COOKIE['password'] === $pass ) return 3; - if (!getConfig('dontBasicAuth')) { + if (getConfig('useBasicAuth')) { // use Basic Auth //$_SERVER['PHP_AUTH_USER'] if ($_SERVER['PHP_AUTH_PW'] !== '') if (md5($_SERVER['PHP_AUTH_PW']) === $pass ) { @@ -1935,7 +1935,7 @@ function render_list($path = '', $files = []) if ($_SERVER['ishidden']==4) { // 加密状态 - if (!getConfig('dontBasicAuth')) { + if (getConfig('useBasicAuth')) { // use Basic Auth return output('Need password.', 401, ['WWW-Authenticate'=>'Basic realm="Secure Area"']); }