-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Remove existence & length checks on passwords & phrases #3854
Conversation
export default { | ||
invalidPassword: | ||
<FormattedMessage | ||
id='createAccount.error.invalidPassword' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency & code readability, this should be noPassword
, similar to the errors below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping it as it was.
@@ -136,7 +136,7 @@ export default class RecoveryPhrase extends Component { | |||
.filter((part) => part.length); | |||
let recoveryPhraseError = null; | |||
|
|||
if (!recoveryPhrase || recoveryPhrase.length < 25 || phraseParts.length < 8) { | |||
if (!recoveryPhrase || !recoveryPhrase.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[tiny grumble] I'd prefer the more explicit recoveryPhrase.length === 0
here. Same below and above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't. Since I read it as "no recoveryPhrase or no recoveryPhrase length" as opposed to "no recoveryPhrase or recoveryPhrase has length 0".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd like the user to be able to create the key with the empty recovery phrase, if they so choose. remember informative, not dictatorial.
@@ -43,9 +43,9 @@ export default class CreateAccount extends Component { | |||
isValidPass: false, | |||
passwordHint: '', | |||
password1: '', | |||
password1Error: ERRORS.invalidPassword, | |||
password1Error: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaict password1Error
can be removed safely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% - I have kept all these in for now for circling back. The following to be logged after doing this -
DRY-up the error checks & validation across the different parts and move to a store - validation is duplicated in the different sections, I guess by organic growth and lack of a proper store (Not a critical item, but it is messy atm and can be done much better - in short, all these are to be cleaned, removed & moved)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is #3887.
... do display a security reminder when passwords are selected.
Closes https://github.com/ethcore/parity/issues/3838