Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/index.php b/index.php
index f92ab6ba..8d507ec7 100644
--- a/index.php
+++ b/index.php
@@ -27,11 +27,11 @@ if (\PHP_SAPI === 'cli-server') {
$new_location = 'Location: http://' . $_SERVER['HTTP_HOST'] . $req_uri;
- if ($filePath && // 1. check that filepath is set
- \is_readable($filePath) && // 2. and references a readable file/folder
- 0 === \mb_strpos($filePath, BASE_PATH . \DIRECTORY_SEPARATOR) && // 3. And is inside this folder
- BASE_PATH . \DIRECTORY_SEPARATOR . 'index.php' !== $filePath && // 4. discard circular references to index.php
- '.' !== \mb_substr(\basename($filePath), 0, 1) // 5. don't serve dotfiles
+ if ($filePath // 1. check that filepath is set
+ && \is_readable($filePath) // 2. and references a readable file/folder
+ && 0 === \mb_strpos($filePath, BASE_PATH . \DIRECTORY_SEPARATOR) // 3. And is inside this folder
+ && BASE_PATH . \DIRECTORY_SEPARATOR . 'index.php' !== $filePath // 4. discard circular references to index.php
+ && '.' !== \mb_substr(\basename($filePath), 0, 1) // 5. don't serve dotfiles
) {
if ('.php' === \mb_strtolower(\mb_substr($filePath, -4))) {
// php file; serve through interpreter