Browse Source

Merge pull request #506 from odb366/fix/onboarding-password-bug

fix(onboarding-password-bug): add more password validation
renovate/lint-staged-8.x
Ben Woosley 7 years ago
committed by GitHub
parent
commit
55a261cfe3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      app/components/Onboarding/Onboarding.js
  2. 2
      app/reducers/onboarding.js

7
app/components/Onboarding/Onboarding.js

@ -124,13 +124,12 @@ const Onboarding = ({
back={null}
next={() => {
// dont allow the user to move on if the confirmation password doesnt match the original password
if (newWalletPasswordProps.showCreateWalletPasswordConfirmationError) {
return
}
// if the password is less than 8 characters or empty dont allow users to proceed
if (
newWalletPasswordProps.passwordMinCharsError ||
!newWalletPasswordProps.createWalletPassword
!newWalletPasswordProps.createWalletPassword ||
!newWalletPasswordProps.createWalletPasswordConfirmation ||
newWalletPasswordProps.showCreateWalletPasswordConfirmationError
) {
return
}

2
app/reducers/onboarding.js

@ -354,7 +354,7 @@ onboardingSelectors.passwordMinCharsError = createSelector(
onboardingSelectors.showCreateWalletPasswordConfirmationError = createSelector(
createWalletPasswordSelector,
createWalletPasswordConfirmationSelector,
(pass1, pass2) => pass1 !== pass2 && pass2.length >= pass1.length
(pass1, pass2) => pass1 !== pass2 && pass2.length > 0
)
onboardingSelectors.showAezeedPasswordConfirmationError = createSelector(

Loading…
Cancel
Save