Skip to content
This repository was archived by the owner on Jan 1, 2020. It is now read-only.

Commit eba4ea8

Browse files
bacinskyakrabat
authored andcommitted
Updated public/index.php, realpath() the $path to decide if it's a same file (when symlink)
1 parent 117f133 commit eba4ea8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
chdir(dirname(__DIR__));
77

88
// Decline static file requests back to the PHP built-in webserver
9-
$path = __DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
9+
$path = realpath(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
1010
if (php_sapi_name() === 'cli-server' && __FILE__ !== $path && is_file($path)) {
1111
return false;
1212
}

0 commit comments

Comments
 (0)