mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Prevent direct access to savesettings.php
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
<?php
|
||||
|
||||
if(basename($_SERVER['SCRIPT_FILENAME']) !== "settings.php")
|
||||
{
|
||||
die("Direct access to this script is forbidden!");
|
||||
}
|
||||
|
||||
function validIP($address){
|
||||
return !filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) === false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user