mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Merge pull request #123 from pi-hole/fix-get-php-file-param
Fix possible list param exploit
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user