code4romania / covid-19-ro-help

Platform for NGOs to create donation requests and to broadcast their services in an emergency
Mozilla Public License 2.0
18 stars 41 forks source link

Username & password with a character only #275

Open DragomirStefanaCatalina opened 4 years ago

DragomirStefanaCatalina commented 4 years ago

Starting point: http://dev.rohelp.ro/en/admin/auth/user/

Expected: Create a new user consisting of an username & a password with at least couple of characters

Actual: Able to create a new user consisting of an username & a password with a character only

Screenshot 2020-04-06 at 22 37 50

AlecsGherghel commented 4 years ago

@catileptic this can be grouped with #236 since both refer to username validation for which we'd have to probably override django's user/group model a bit

francisc-czobor commented 4 years ago

On the dev environment the password validators are deactivated. That's why you can have a one-character password. It's not a problem on the production environment.

francisc-czobor commented 4 years ago

The Django User model doesn't have a min_length constraint. To change that one would have to overwrite the User model and that would vastly increase the complexity. Why is this desired?