Skip to content

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

Closed

Description

@marcaaron

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,}$',

Activity

  1. melvin-bot commented on Apr 26, 2022

    @melvin-bot

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

  2. added and removed
    AutoAssignerTriageAuto assign issues for triage to an available triage team member
    on Apr 26, 2022
  3. melvin-bot commented on May 2, 2022

    @melvin-bot

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

  4. melvin-bot commented on May 2, 2022

    @melvin-bot

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

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 2, 2022
  6. melvin-bot commented on May 2, 2022

    @melvin-bot

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

  7. tgolen commented on May 2, 2022

    @tgolen
    Contributor

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

  8. thesahindia commented on May 3, 2022

    @thesahindia
    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?

  9. tgolen commented on May 3, 2022

    @tgolen
    Contributor

    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.

  10. removed their assignment
    on May 3, 2022
  11. 20 remaining items

  12. 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[/+] on May 16, 2022
  13. melvin-bot commented on May 16, 2022

    @melvin-bot

    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. 🎊

  14. mananjadhav commented on May 24, 2022

    @mananjadhav
    Collaborator

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

  15. mallenexpensify commented on May 26, 2022

    @mallenexpensify
    Contributor

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

  16. melvin-bot commented on May 26, 2022

    @melvin-bot

    📣 @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 📖

  17. mananjadhav commented on May 26, 2022

    @mananjadhav
    Collaborator
  18. mallenexpensify commented on May 26, 2022

    @mallenexpensify
    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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions