1
0
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:
Hannes Magnusson
2007-11-20 22:13:00 +00:00
parent 426d33d942
commit 40f1939573

View File

@@ -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'];