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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
5 deletions
-
app/components/Onboarding/Onboarding.js
-
app/reducers/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 |
|
|
|
} |
|
|
|
|
|
@ -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( |
|
|
|