From a4eb3ee508804bc1c7c489ea252a9841139e38fb Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Tue, 25 Sep 2018 21:53:04 +0200 Subject: Validate email in occ command Signed-off-by: Daniel Kesselberg --- lib/private/Setup.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/private/Setup.php') diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 9346edd8363..e9719705fcd 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -416,12 +416,7 @@ class Setup { // Set email for admin if (!empty($options['adminemail'])) { - $adminEmail = htmlspecialchars_decode($options['adminemail']); - if (filter_var($adminEmail, FILTER_VALIDATE_EMAIL)) { - $config->setUserValue($user->getUID(), 'settings', 'email', $adminEmail); - } else { - $error[] = "Invalid e-mail-address <$adminEmail> for <$username>."; - } + $config->setUserValue($user->getUID(), 'settings', 'email', $options['adminemail']); } } -- cgit v1.2.3