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

[HOLD for payment 2022-05-23] [$250] Validate password complexity in the front end #8794

Closed
marcaaron opened this issue Apr 26, 2022 · 19 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@marcaaron
Copy link
Contributor

marcaaron commented Apr 26, 2022

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Sign in with a password that is too short

Expected Result:

  1. Error message is shown and we do not call Authenticate command

Actual Result:

  1. Authenticate command is called and error message is shown

2022-04-26_13-33-12

Workaround:

Yes

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number:
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:

Job Post https://www.upwork.com/jobs/~01b4cd92ce29d9f69c

View all open jobs on GitHub

IMPORTANT

Our password complexity check is in use here we're just not using it for sign in

App/src/CONST.js

Lines 376 to 377 in 84d058f

// at least 8 characters, 1 capital letter, 1 lowercase number, 1 number
PASSWORD_COMPLEXITY_REGEX_STRING: '^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,}$',

@marcaaron marcaaron added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Apr 26, 2022
@melvin-bot
Copy link

melvin-bot bot commented Apr 26, 2022

Triggered auto assignment to @muttmuure (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@melvin-bot melvin-bot bot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Apr 26, 2022
@melvin-bot melvin-bot bot added the Overdue label Apr 29, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 2, 2022

@muttmuure Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot
Copy link

melvin-bot bot commented May 2, 2022

@muttmuure Huh... This is 4 days overdue. Who can take care of this?

@tgolen tgolen added the External Added to denote the issue can be worked on by a contributor label May 2, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 2, 2022

Triggered auto assignment to @kevinksullivan (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@tgolen
Copy link
Contributor

tgolen commented May 2, 2022

@thesahindia Care to put a quick proposal together for this?

@thesahindia
Copy link
Member

@thesahindia Care to put a quick proposal together for this?

Yeah sure.

Proposal

We have a function for this already -

function isValidPassword(password) {
return password.match(CONST.PASSWORD_COMPLEXITY_REGEX_STRING);

We can just use it inside validateAndSubmitForm

validateAndSubmitForm() {
if (!this.state.password.trim() && this.props.account.requiresTwoFactorAuth && !this.state.twoFactorAuthCode.trim()) {
this.setState({formError: 'passwordForm.pleaseFillOutAllFields'});
return;
}
if (!this.state.password.trim()) {
this.setState({formError: 'passwordForm.pleaseFillPassword'});

        if (!ValidationUtils.isValidPassword(this.state.password)) {
            this.setState({formError: 'passwordForm.error.incorrectLoginOrPassword'});
            return;
        }

Just a quick question, we wanna show the same error message right?

@tgolen
Copy link
Contributor

tgolen commented May 3, 2022

Looks good to me! @kevinksullivan Can you spin up something in Upwork for this and hire @thesahindia?

Just a quick question, we wanna show the same error message right?

Yeah, I think passwordForm.error.incorrectLoginOrPassword is fine to use for now.

@muttmuure muttmuure removed their assignment May 3, 2022
@melvin-bot melvin-bot bot removed the Overdue label May 3, 2022
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels May 3, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 3, 2022

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (Exported)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 3, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 3, 2022

Triggered auto assignment to @AndrewGable (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot changed the title Validate password complexity in the front end [$250] Validate password complexity in the front end May 3, 2022
@kevinksullivan kevinksullivan removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 3, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 3, 2022

📣 @mananjadhav You have been assigned to this job by @kevinksullivan!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@kevinksullivan
Copy link
Contributor

hm sorry about that @mananjadhav , I added you back in case we need a C+ for review.

@thesahindia I sent an offer for the job in Upwork, please accept when you get a chance.

@thesahindia
Copy link
Member

thesahindia commented May 4, 2022

Accepted the offer, will raise the PR today.

Edit: Made the PR

@kevinksullivan
Copy link
Contributor

Waiting on deploy.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Overdue Weekly KSv2 labels May 13, 2022
@melvin-bot melvin-bot bot changed the title [$250] Validate password complexity in the front end [HOLD for payment 2022-05-23] [$250] Validate password complexity in the front end May 16, 2022
@melvin-bot
Copy link

melvin-bot bot commented May 16, 2022

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.60-3 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 2022-05-23. 🎊

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 22, 2022
@mananjadhav
Copy link
Collaborator

@kevinksullivan Bump for the payment on Upwork. I had applied as a C+, which isn't accepted I guess.

@mallenexpensify
Copy link
Contributor

Hired ya @mananjadhav , let us know when you accept
Paid @thesahindia $250 for the fix,

@melvin-bot
Copy link

melvin-bot bot commented May 26, 2022

📣 @thesahindia You have been assigned to this job by @mallenexpensify!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added the Overdue label May 26, 2022
@mananjadhav
Copy link
Collaborator

Accepted @mallenexpensify

@melvin-bot melvin-bot bot removed the Overdue label May 26, 2022
@mallenexpensify
Copy link
Contributor

Paid @mananjadhav $250 for C+
Thanks for the help y'all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants