-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-03-25] [$500] Web - 2FA - Authentication code value is not accepted when put Space and than correct it #35947
Comments
Job added to Upwork: https://www.upwork.com/jobs/~018d55723e0e20585e |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha ( |
Triggered auto assignment to @puneetlath ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Authentication code value is not accepted when put Space and than correct it What is the root cause of that problem?We don't have sanity checks for the input value in the textbox App/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js Lines 286 to 289 in 8563c0f
Also the max length of textbox is 8, What changes do you think we should make in order to solve the problem?have a sanity check to remove all the whitespaces and pass clean value to validate. Also while sending data to the backend below, trim the input to remove whitespaces
Update the if (!ValidationUtils.isValidRecoveryCode(recoveryCode.trim())) { and update the submit input code to: const recoveryCodeOr2faCode = props.isUsingRecoveryCode ? recoveryCode.trim() : twoFactorAuthCode; Update the Line 934 in f6ba751
This will help us revalidate our logic as if we remove the
Here we will still send the whitespaces if we remove the App/src/libs/ValidationUtils.ts Lines 284 to 286 in f6ba751
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Authentication code value is not accepted when put Space and than correct it What is the root cause of that problem?The validation check in this file does not cater for spaces App/src/libs/ValidationUtils.ts Line 285 in 8563c0f
What changes do you think we should make in order to solve the problem?We should update the REGEX pattern in the const file for spaces or trim it. Line 883 in 8563c0f
What alternative solutions did you explore? (Optional)na |
Proposal updatedOnly updated the Solution, no concept change only added code to support my solution |
ProposalPlease re-state the problem that we are trying to solve in this issue.Authentication code value is not accepted when put Space and than correct it. What is the root cause of that problem?This happened as when pasting with space the last digit did not get pasted. This is a UX bug as we do not expect the recovery code input to have a tight character limit (or trim silently when pasting). It is also unclear that the recovery code limit is 8 (since it is not a standard number). We should remove the What changes do you think we should make in order to solve the problem?We will remove the AlternativelyWe can set it to |
|
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@getusha hi, seems like the original error happened has we have a tight Requesting you to take another look 🙇 |
Proposal updatedConsidering the comments from @neonbhai , i have proposed updated solution, but have proposed a different approach and we still need to trim the input as we cannot allow it to be passed to the BE, also removing |
thanks for pointing this out @neonbhai, will re-evaluate proposals. |
Yes, but you still seem to have an incorrect RCA |
I think the RCA is going to be a mix of both our approaches as even when you remove the |
@neonbhai after removing |
I think we can keep it optimistic like Similar issue here did not keep the editing space very tight, even though the actual length of input would be |
We would still require to trim the input as the original bug issue wanted to get logged in even if there were spaces but the code entered is correct |
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
📣 @getusha 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
@neonbhai how's it going? |
Raising PR shortly! |
@neonbhai any issues i can help with? |
Having trouble with the android build, updating screenshots shortly! |
This issue has not been updated in over 15 days. @puneetlath, @neonbhai, @getusha eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
PR has been merged and deployed to staging |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.53-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-03-25. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@getusha friendly reminder about the checklist so that we can pay on Monday. |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@puneetlath apologies, I forgot about the checklist despite your reminder. 😄 |
No worries! Thanks for taking care of it. It looks like it didn't auto-offer you for some reason. Offer is here: https://www.upwork.com/nx/wm/offer/101569210 Please ping me on the issue when you've accepted |
@puneetlath accepted. |
All paid. Thanks everyone! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.37-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers): applausetester+0507gm@applause.expensifail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Precondition:
User should have 2-FA enabled
1.Log in to staging.new.expensify.com
2. Enter email address from precondition
3. Navigate to email and locate the magic link - change to staging if needed
4. Open an new tab and navigate to the staging link
5. Verify the 2FA required page is displayed
6. Navigate back to the original tab
7. Click on "Use recovery code" to change to "Use 2 factor authentication code"
8. Enter authentication code with space at the beginning
9. Click Sign in
10. Error message will appear
11. Erase the space
12. Click Sign in
Expected Result:
Error should dismiss and user should successfully log in
Actual Result:
Error message reappears and user can not log in
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6369712_1707245790430.Recording__2113.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: