From e32bc2d07af4bd468e93b9680cc4df2504dc589c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Wed, 17 Aug 2022 23:18:07 +0200 Subject: [PATCH] Remove email functionality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- scripts/pi-hole/php/func.php | 10 ---------- scripts/pi-hole/php/savesettings.php | 9 --------- settings.php | 16 ---------------- 3 files changed, 35 deletions(-) diff --git a/scripts/pi-hole/php/func.php b/scripts/pi-hole/php/func.php index cf43271c1..bb59611a9 100644 --- a/scripts/pi-hole/php/func.php +++ b/scripts/pi-hole/php/func.php @@ -86,16 +86,6 @@ function validMAC($mac_addr) return !filter_var($mac_addr, FILTER_VALIDATE_MAC) === false; } -function validEmail($email) -{ - return filter_var($email, FILTER_VALIDATE_EMAIL) - // Make sure that the email does not contain special characters which - // may be used to execute shell commands, even though they may be valid - // in an email address. If the escaped email does not equal the original - // email, it is not safe to store in setupVars. - && escapeshellcmd($email) === $email; -} - function get_ip_type($ip) { return filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ? 4 : diff --git a/scripts/pi-hole/php/savesettings.php b/scripts/pi-hole/php/savesettings.php index 261317e16..41f03a64f 100644 --- a/scripts/pi-hole/php/savesettings.php +++ b/scripts/pi-hole/php/savesettings.php @@ -416,15 +416,6 @@ function addStaticDHCPLease($mac, $ip, $hostname) break; case 'webUI': - $adminemail = trim($_POST['adminemail']); - if (strlen($adminemail) == 0 || !isset($adminemail)) { - $adminemail = ''; - } - if (strlen($adminemail) > 0 && !validEmail($adminemail)) { - $error .= 'Administrator email address ('.htmlspecialchars($adminemail).') is invalid!
'; - } else { - pihole_execute('-a -e \''.$adminemail.'\''); - } if (isset($_POST['boxedlayout'])) { pihole_execute('-a layout boxed'); } else { diff --git a/settings.php b/settings.php index eb9219558..069a27cae 100644 --- a/settings.php +++ b/settings.php @@ -1027,14 +1027,6 @@ -
@@ -1138,14 +1130,6 @@
-
-
-

Administrator Email Address

- - - -
-