Skip to content

Commit cc3426a

Browse files
authored
fix: 部分虚拟机提供商的HTTPS值为ON,导致['HTTPS'] == 'on'失效,转换为小写后比较 (#1344)
1 parent 645d09a commit cc3426a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tinyfilemanager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ function session_error_handling_function($code, $msg, $file, $line)
257257
$use_auth = false;
258258
}
259259

260-
$is_https = isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1)
260+
$is_https = isset($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on' || $_SERVER['HTTPS'] == 1)
261261
|| isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https';
262262

263263
// update $root_url based on user specific directories

0 commit comments

Comments
 (0)