From a96385dc315563abdd08e5a43b196a370209f984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Schw=C3=A4rzl?= Date: Thu, 25 Apr 2019 11:48:07 +0200 Subject: [PATCH] :bug: check if the username begins or ends with a period --- openbook_auth/validators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openbook_auth/validators.py b/openbook_auth/validators.py index 2c0a40d1..fa4d9995 100644 --- a/openbook_auth/validators.py +++ b/openbook_auth/validators.py @@ -6,9 +6,9 @@ def username_characters_validator(username): - if not re.match('^[a-zA-Z0-9_.]*$', username): + if not re.match('^(?!\.)[a-zA-Z0-9_.]*(?