Merge pull request #123 from pi-hole/fix-get-php-file-param

Fix possible list param exploit
This commit is contained in:
Mcat12
2016-08-16 16:11:38 -04:00
committed by GitHub
+4
View File
@@ -3,6 +3,10 @@ if(!isset($_GET['list']))
die();
$type = $_GET['list'];
if($type !== "white" && $type !== "black")
die("Invalid list parameter");
$rawList = file_get_contents("/etc/pihole/${type}list.txt");
$list = explode("\n", $rawList);