Browse Source

! improved / increased phpinfo filtering

Spuds 13 years ago
parent
commit
13afa35c8e
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Sources/ManageServer.php

+ 4 - 2
Sources/ManageServer.php

@@ -875,12 +875,14 @@ function ShowPHPinfoSettings()
 	$info_lines = preg_replace('~^.*<body>(.*)</body>.*$~', '$1', ob_get_contents());
 	$info_lines = explode("\n", strip_tags($info_lines, "<tr><td><h2>"));
 	ob_end_clean();
+	
+	// remove things that could be considered sensative
+	$remove = '_COOKIE|Cookie|_GET|_REQUEST|REQUEST_URI|QUERY_STRING|REQUEST_URL|HTTP_REFERER';
 
 	// put all of it into an array
 	foreach ($info_lines as $line)
 	{
-		// lets not load/show these as they may contain session info
-		if (strpos($line, '_COOKIE') !== false || strpos($line, 'Cookie') !== false || strpos($line, '_GET') !== false || strpos($line, '_REQUEST') !== false)
+		if (preg_match('~(' . $remove . ')~', $line))
 			continue;
 
 		// new category?