summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2018-09-25 21:53:04 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-10-02 22:24:30 +0200
commita4eb3ee508804bc1c7c489ea252a9841139e38fb (patch)
tree165f8a09649081a551328e9481075ad5a00244e0 /lib
parent13877c2d2068189cff180ea8f4f62826afda6414 (diff)
downloadnextcloud-server-a4eb3ee508804bc1c7c489ea252a9841139e38fb.tar.gz
nextcloud-server-a4eb3ee508804bc1c7c489ea252a9841139e38fb.zip
Validate email in occ command
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Setup.php7
1 files changed, 1 insertions, 6 deletions
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']);
}
}