Skip to content
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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

chinma-yyy
Copy link
Contributor

@chinma-yyy chinma-yyy commented Mar 8, 2023

Proposed changes (including videos or screenshots)

Before

Screenshot from 2023-03-08 21-46-03

After

Screenshot from 2023-03-08 21-44-33

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.

@chinma-yyy
Copy link
Contributor Author

Hey @dudanogueira can you have a look ?✌️

@chinma-yyy
Copy link
Contributor Author

Hey @hugocostadev can you review this . This is a very important issue.

@chinma-yyy chinma-yyy changed the title [FIX] Invalid Username prompt shown to user for invalid input [FIX] Invalid User registration without username validation Mar 12, 2023
@chinma-yyy
Copy link
Contributor Author

Hey @dudanogueira @hugocostadev any comments?

@chinma-yyy chinma-yyy changed the title [FIX] Invalid User registration without username validation regression: Invalid User registration without username validation Mar 12, 2023
@yash-rajpal yash-rajpal self-assigned this Apr 4, 2023
Copy link
Member

@yash-rajpal yash-rajpal left a 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
Copy link

codecov bot commented Apr 4, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.40%. Comparing base (ef57d6a) to head (550cc59).
Report is 2358 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
e2e 45.36% <ø> (+8.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@chinma-yyy
Copy link
Contributor Author

hey @yash-rajpal the pr is ready with changes!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No Feedback for invalid password or user Id
4 participants