From 7271ec7acf0e10a7cad62a078cb1dc4f4be7c30d Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 23 Nov 2022 14:42:23 +0100 Subject: spaces are allowed in userids Signed-off-by: Simon L --- lib/private/User/Manager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/private/User') diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index 82fc4d818ad..937d825ed77 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -714,10 +714,10 @@ class Manager extends PublicEmitter implements IUserManager { $l = Server::get(IFactory::class)->get('lib'); // Check the name for bad characters - // Allowed are: "a-z", "A-Z", "0-9" and "_.@-'" + // Allowed are: "a-z", "A-Z", "0-9", spaces and "_.@-'" if (preg_match('/[^a-zA-Z0-9 _.@\-\']/', $uid)) { throw new \InvalidArgumentException($l->t('Only the following characters are allowed in a username:' - . ' "a-z", "A-Z", "0-9", and "_.@-\'"')); + . ' "a-z", "A-Z", "0-9", spaces and "_.@-\'"')); } // No empty username -- cgit v1.2.3