Apply restrictions to username characters during signup

This commit is contained in:
Eliot Berriot 2018-07-22 13:05:43 +02:00
parent dcd33693e5
commit ba76fe9f49
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
5 changed files with 39 additions and 1 deletions

View file

@ -302,6 +302,7 @@ SESSION_COOKIE_HTTPONLY = False
ACCOUNT_AUTHENTICATION_METHOD = "username_email"
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
ACCOUNT_USERNAME_VALIDATORS = "funkwhale_api.users.serializers.username_validators"
# Custom user app defaults
# Select the correct user model
@ -432,6 +433,7 @@ PLAYLISTS_MAX_TRACKS = env.int("PLAYLISTS_MAX_TRACKS", default=250)
ACCOUNT_USERNAME_BLACKLIST = [
"funkwhale",
"library",
"instance",
"test",
"status",
"root",