summaryrefslogtreecommitdiffstats
path: root/apps/settings/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-03-23 14:52:04 +0100
committerJoas Schilling <coding@schilljs.com>2021-04-22 16:34:13 +0200
commitd80cc76ee7f3f1f347fc54cc300e5e38ba7d6e19 (patch)
treef9e885f7c84ef77d487a95ffe56dc62c845b8005 /apps/settings/lib
parenta011b7021ef7153acce6978a1c65db0a8c7ec32d (diff)
downloadnextcloud-server-d80cc76ee7f3f1f347fc54cc300e5e38ba7d6e19.tar.gz
nextcloud-server-d80cc76ee7f3f1f347fc54cc300e5e38ba7d6e19.zip
Validate the website field input to be a valid URL
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/settings/lib')
-rw-r--r--apps/settings/lib/Controller/UsersController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php
index a9b72571de6..0e09e19fea3 100644
--- a/apps/settings/lib/Controller/UsersController.php
+++ b/apps/settings/lib/Controller/UsersController.php
@@ -491,6 +491,9 @@ class UsersController extends Controller {
if ($e->getMessage() === IAccountManager::PROPERTY_PHONE) {
throw new \InvalidArgumentException($this->l10n->t('Unable to set invalid phone number'));
}
+ if ($e->getMessage() === IAccountManager::PROPERTY_WEBSITE) {
+ throw new \InvalidArgumentException($this->l10n->t('Unable to set invalid website'));
+ }
throw new \InvalidArgumentException($this->l10n->t('Some account data was invalid'));
}
}