From f59886c33f1ccdb8575afca2a5aa6783f27bfa4b Mon Sep 17 00:00:00 2001 From: radex Date: Mon, 23 Oct 2023 19:50:30 +0200 Subject: [PATCH] ldaputils: allow dot in names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit turns out we have 3 users with dots in their uid ¯\_(ツ)_/¯ --- webapp/ldaputils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/ldaputils.py b/webapp/ldaputils.py index 9330bfd..a8230e2 100644 --- a/webapp/ldaputils.py +++ b/webapp/ldaputils.py @@ -4,7 +4,7 @@ from webapp import config def is_valid_name(name): """`true` if `name` is a safe ldap uid/cn""" - return re.match(r'^[a-zA-Z_][a-zA-Z0-9-_]*\Z', name) is not None + return re.match(r'^[a-zA-Z_][a-zA-Z0-9-_\.]*\Z', name) is not None def validate_name(name): """Raises `RuntimeError` if `name` is not a safe ldap uid/cn"""