admin can manage the dir contain index.html

This commit is contained in:
qkqpttgf 2020-01-31 12:33:48 +08:00 committed by GitHub
parent 193bf799ef
commit 9f2bae5017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -216,7 +216,7 @@
if (isset($file['file'])) {
if ($_SERVER['admin'] or (substr($file['name'],0,1) !== '.' and $file['name'] !== getConfig('passfile') ) ) {
if (strtolower($file['name']) === 'readme.md') $readme = $file;
if (strtolower($file['name']) === 'index.html') {
if (strtolower($file['name']) === 'index.html' && !$_SERVER['admin']) {
$html = curl_request(fetch_files(spurlencode(path_format($path . '/' .$file['name']),'/'))['@microsoft.graph.downloadUrl'])['body'];
return output($html,200);
}