From 207ebbb27f1bdff45ba520fb92c14383f552fd7c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 9 Dec 2023 17:20:41 +0100 Subject: [PATCH 1/2] Allow dots in usernames --- share/actionsmap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/actionsmap.yml b/share/actionsmap.yml index 464a4e024..9382c70f3 100644 --- a/share/actionsmap.yml +++ b/share/actionsmap.yml @@ -63,7 +63,7 @@ user: help: The unique username to create extra: pattern: &pattern_username - - !!str ^[a-z0-9_]+$ + - !!str ^[a-z0-9_\.]+$ - "pattern_username" -F: full: --fullname From 5738526349c392249c5745d23127eb65eb0bd1c4 Mon Sep 17 00:00:00 2001 From: YapWC <34093361+YapWC@users.noreply.github.com> Date: Tue, 19 Dec 2023 10:13:03 +0800 Subject: [PATCH 2/2] Update user.py Allowed dots to be used in creating username --- src/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user.py b/src/user.py index 00876854e..4ad23525a 100644 --- a/src/user.py +++ b/src/user.py @@ -38,7 +38,7 @@ from yunohost.utils.system import binary_to_human logger = getActionLogger("yunohost.user") FIELDS_FOR_IMPORT = { - "username": r"^[a-z0-9_]+$", + "username": r"^[a-z0-9_.]+$", "firstname": r"^([^\W\d_]{1,30}[ ,.\'-]{0,3})+$", "lastname": r"^([^\W\d_]{1,30}[ ,.\'-]{0,3})+$", "password": r"^|(.{3,})$",