Require passwords on accounts (#1754)

- Fixed an issue where Users/Teams could be created with a null password through the Admin Panel
This commit is contained in:
Kevin Chung
2020-12-04 18:56:42 -05:00
committed by GitHub
parent cb5ba26bdb
commit ecdb99e2f1
3 changed files with 3 additions and 1 deletions

View File

@@ -63,6 +63,7 @@
- Examples for regex flags are now provided - Examples for regex flags are now provided
- Wrong submissions has been renamed to Incorrect Submissions - Wrong submissions has been renamed to Incorrect Submissions
- Graphs in the Admin Statistics page will now scroll with mouse wheel to improve browsing large datasets - Graphs in the Admin Statistics page will now scroll with mouse wheel to improve browsing large datasets
- Fixed an issue where Users/Teams could be created with a null password
**Deployment** **Deployment**

View File

@@ -33,6 +33,7 @@ class TeamSchema(ma.ModelSchema):
allow_none=False, allow_none=False,
validate=validate.Email("Emails must be a properly formatted email address"), validate=validate.Email("Emails must be a properly formatted email address"),
) )
password = field_for(Teams, "password", required=True, allow_none=False)
website = field_for( website = field_for(
Teams, Teams,
"website", "website",

View File

@@ -51,7 +51,7 @@ class UserSchema(ma.ModelSchema):
], ],
) )
country = field_for(Users, "country", validate=[validate_country_code]) country = field_for(Users, "country", validate=[validate_country_code])
password = field_for(Users, "password") password = field_for(Users, "password", required=True, allow_none=False)
fields = Nested( fields = Nested(
UserFieldEntriesSchema, partial=True, many=True, attribute="field_entries" UserFieldEntriesSchema, partial=True, many=True, attribute="field_entries"
) )