only lowercase usernames allowed

This commit is contained in:
fram3d 2023-11-01 14:11:05 +01:00
parent 654dfceaf0
commit 0d33b52243
Signed by: fram3d
GPG Key ID: 938920E709EEA32A
1 changed files with 4 additions and 0 deletions

View File

@ -117,6 +117,10 @@ def register():
if len(password) < 8:
return 'Error: password is too short'
# Check if username has uppercase
if username.islower() == False:
return 'Error: uppercase characters in username are not allowed'
# Create a LUSER connection
luser = LUSER(LDAPHOST,LDAPADMINNAME,LDAPPASS,USERBASE,ALTUSERBASE)
# Try to add user