-
Notifications
You must be signed in to change notification settings - Fork 10k
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
regression: Invalid User registration without username validation #28329
base: develop
Are you sure you want to change the base?
Conversation
Hey @dudanogueira can you have a look ?✌️ |
Hey @hugocostadev can you review this . This is a very important issue. |
Hey @dudanogueira @hugocostadev any comments? |
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.
Hey @chinma-yyy Can you please resolve the conflicts?
Thanks for the contribution!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #28329 +/- ##
===========================================
+ Coverage 37.07% 45.40% +8.32%
===========================================
Files 623 726 +103
Lines 12324 14279 +1955
Branches 1990 2213 +223
===========================================
+ Hits 4569 6483 +1914
+ Misses 7507 7489 -18
- Partials 248 307 +59
Flags with carried forward coverage won't be shown. Click here to find out more. |
hey @yash-rajpal the pr is ready with changes!! |
Proposed changes (including videos or screenshots)
Before
After
Issue(s)
closes #28223 One task of this issue is fixed where the invalid username prompt is given to user
On create an account page enter any username that doesn't match the username policy but the prompt is not shown and also the user is created in the database irrespective of the username validation which leads to Email-already-exists error due to user creation in database. The user then thinks that the the account is not created.
Steps to test or reproduce
On create an account page enter any invalid username
Further comments
So I have added a direct check before registerUser method call just after the API call to check for username validation which returns API failure on invalid username . Earlier the user was being registered and then the username was being set by calling setUsername method which resulted in unacceptable results.