diff --git a/scripts/pi-hole/php/savesettings.php b/scripts/pi-hole/php/savesettings.php index 5c759c6d..e78411e1 100644 --- a/scripts/pi-hole/php/savesettings.php +++ b/scripts/pi-hole/php/savesettings.php @@ -130,6 +130,9 @@ function isinserverlist($addr) { if(isset($_POST["field"])) { + // Handle CSRF + check_csrf(isset($_POST["token"]) ? $_POST["token"] : ""); + // Process request switch ($_POST["field"]) { // Set DNS server diff --git a/settings.php b/settings.php index 29b0f91b..f7130b8a 100644 --- a/settings.php +++ b/settings.php @@ -392,6 +392,7 @@ @@ -588,6 +589,7 @@ @@ -629,6 +631,7 @@
+ @@ -713,6 +716,7 @@ @@ -764,6 +768,7 @@
@@ -795,12 +800,15 @@
+
+
+
@@ -863,6 +871,7 @@ if($FTL)

Upload only Pi-hole backup files.

+