Compare commits

..

2 Commits

Author SHA1 Message Date
d0ba096710
add gitignore 2023-11-01 14:11:32 +01:00
0d33b52243
only lowercase usernames allowed 2023-11-01 14:11:05 +01:00
2 changed files with 5 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
__pycache__

View File

@ -117,6 +117,10 @@ def register():
if len(password) < 8: if len(password) < 8:
return 'Error: password is too short' 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 # Create a LUSER connection
luser = LUSER(LDAPHOST,LDAPADMINNAME,LDAPPASS,USERBASE,ALTUSERBASE) luser = LUSER(LDAPHOST,LDAPADMINNAME,LDAPPASS,USERBASE,ALTUSERBASE)
# Try to add user # Try to add user