Disallow usernames only containing "."

This commit is contained in:
rubenwardy 2022-10-13 19:23:18 +01:00
parent 905185812b
commit a7f2cc5d2b

@ -25,7 +25,8 @@ YESES = ["yes", "true", "1", "on"]
def is_username_valid(username):
return username is not None and len(username) >= 2 and re.match(r"^[A-Za-z0-9._-]*$", username)
return username is not None and len(username) >= 2 and \
re.match(r"^[A-Za-z0-9._-]*$", username) and not re.match(r"^\.*$")
def isYes(val):