mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 18:59:48 +01:00
Remove email functionality
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
@@ -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 :
|
||||
|
||||
@@ -416,15 +416,6 @@ if (isset($_POST['field'])) {
|
||||
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!<br>';
|
||||
} else {
|
||||
pihole_execute('-a -e \''.$adminemail.'\'');
|
||||
}
|
||||
if (isset($_POST['boxedlayout'])) {
|
||||
pihole_execute('-a layout boxed');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user