-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User: Make email required at all times, password required for new users #10938
Conversation
DryRun Security SummaryThe pull request focuses on improving the security and robustness of the user management functionality by enforcing email and password requirements, restricting password updates, validating password strength, implementing least privilege, and improving test coverage. Expand for full summarySummary: The code changes in this pull request focus on improving the security and robustness of the user management functionality in the application. The changes include:
Files Changed:
Code AnalysisWe ran
Riskiness🟢 Risk threshold not exceeded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small comment about one of the tests
response = self.client.post(self.url, payload) | ||
self.assertEqual(201, response.status_code, response.content[:1000]) | ||
self.assertEqual(self.endpoint_model.objects.count(), length + 1) | ||
|
||
def test_create_user_with_non_configuration_permissions(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess test_create_user_with_non_configuration_permissions
will fail with both object does not exist
and a message about the user missing a password, but seems like we should supply the password just to make it clearer what's supposed to fail here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure thing
Creating local users is not the best experience. To accommodate a flow that supports sending temporary passwords to user, and forcing them to login again, we need to make the password field and email field required attributes for new users
[sc-7616]