Merge branch 'qkqpttgf:master' into master
commit
27421138b6
|
@ -35,7 +35,7 @@ $EnvConfigs = [
|
||||||
'customCss' => 0b011,
|
'customCss' => 0b011,
|
||||||
'customTheme' => 0b011,
|
'customTheme' => 0b011,
|
||||||
'theme' => 0b010,
|
'theme' => 0b010,
|
||||||
'dontBasicAuth' => 0b010,
|
'useBasicAuth' => 0b010,
|
||||||
'referrer' => 0b011,
|
'referrer' => 0b011,
|
||||||
'forceHttps' => 0b010,
|
'forceHttps' => 0b010,
|
||||||
|
|
||||||
|
@ -727,7 +727,7 @@ function comppass($pass)
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
if ($_COOKIE['password'] !== '') if ($_COOKIE['password'] === $pass ) return 3;
|
if ($_COOKIE['password'] !== '') if ($_COOKIE['password'] === $pass ) return 3;
|
||||||
if (!getConfig('dontBasicAuth')) {
|
if (getConfig('useBasicAuth')) {
|
||||||
// use Basic Auth
|
// use Basic Auth
|
||||||
//$_SERVER['PHP_AUTH_USER']
|
//$_SERVER['PHP_AUTH_USER']
|
||||||
if ($_SERVER['PHP_AUTH_PW'] !== '') if (md5($_SERVER['PHP_AUTH_PW']) === $pass ) {
|
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 ($_SERVER['ishidden']==4) {
|
||||||
// 加密状态
|
// 加密状态
|
||||||
if (!getConfig('dontBasicAuth')) {
|
if (getConfig('useBasicAuth')) {
|
||||||
// use Basic Auth
|
// use Basic Auth
|
||||||
return output('Need password.', 401, ['WWW-Authenticate'=>'Basic realm="Secure Area"']);
|
return output('Need password.', 401, ['WWW-Authenticate'=>'Basic realm="Secure Area"']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ $constStr = [
|
||||||
'disableShowThumb' => 'if 1, the ShowThumbnail button will not display',
|
'disableShowThumb' => 'if 1, the ShowThumbnail button will not display',
|
||||||
'disableChangeTheme' => 'if 1, the Theme selection button will not display',
|
'disableChangeTheme' => 'if 1, the Theme selection button will not display',
|
||||||
'downloadencrypt' => '0 or 1. if 1, the files in encrypt folder can be downloaded without password',
|
'downloadencrypt' => '0 or 1. if 1, the files in encrypt folder can be downloaded without password',
|
||||||
'dontBasicAuth' => 'if 1, will not popup user/pass windows in encrypted folder, but show the page in theme.',
|
'useBasicAuth' => 'if 1, will popup user/pass windows in encrypted folder.',
|
||||||
'background' => 'Set an url as background photo.',
|
'background' => 'Set an url as background photo.',
|
||||||
'backgroundm' => 'Set an url as background in mobile phone.',
|
'backgroundm' => 'Set an url as background in mobile phone.',
|
||||||
'forceHttps' => 'if 1, force to redirect to https when visit via http.',
|
'forceHttps' => 'if 1, force to redirect to https when visit via http.',
|
||||||
|
@ -129,7 +129,7 @@ $constStr = [
|
||||||
'disableShowThumb' => '如果填 1, ‘显示缩略’按钮将被隐藏。',
|
'disableShowThumb' => '如果填 1, ‘显示缩略’按钮将被隐藏。',
|
||||||
'disableChangeTheme' => '如果为 1,则不会显示主题选择按钮',
|
'disableChangeTheme' => '如果为 1,则不会显示主题选择按钮',
|
||||||
'downloadencrypt' => '0 或 1。如果 1, 那加密目录内的文件可以不需要密码就能下载。',
|
'downloadencrypt' => '0 或 1。如果 1, 那加密目录内的文件可以不需要密码就能下载。',
|
||||||
'dontBasicAuth' => '如果为 1,加密目录不再弹出用户名密码窗口,只会显示主题自带的页面。',
|
'useBasicAuth' => '如果为 1,加密目录将弹出用户名密码窗口,不会显示主题自带的输入密码页面。',
|
||||||
'background' => '设置一个url作为背景。',
|
'background' => '设置一个url作为背景。',
|
||||||
'backgroundm' => '设置一个url作为手机端用的背景。',
|
'backgroundm' => '设置一个url作为手机端用的背景。',
|
||||||
'forceHttps' => '0或1。如果设置为1,会强制跳转https',
|
'forceHttps' => '0或1。如果设置为1,会强制跳转https',
|
||||||
|
|
Loading…
Reference in New Issue