mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Add "view source" ability to the reST/ folder
This commit is contained in:
@@ -50,7 +50,7 @@ $dir = dirname($_GET['url']);
|
||||
if (!empty($dir) && !preg_match("!^(\\.|/)$!", $dir)) {
|
||||
|
||||
// Check if the specified dir is valid
|
||||
$legal_dirs = array("/manual", "/include", "/stats", "/error", "/license", "/conferences", "/archive", "/releases", "/security");
|
||||
$legal_dirs = array("/manual", "/include", "/stats", "/error", "/license", "/conferences", "/archive", "/releases", "/security", "/reST");
|
||||
if ((preg_match("!^/manual/!", $dir) || in_array($dir, $legal_dirs)) &&
|
||||
strpos($dir, "..") === FALSE) {
|
||||
$page_name = $_SERVER['DOCUMENT_ROOT'] . $_GET['url'];
|
||||
|
||||
Reference in New Issue
Block a user