Status-react: Add validation for Seed Phrase in the Restore Access flow

Created on 20 May 2017  Â·  8Comments  Â·  Source: status-im/status-react

User Story

As a user I want an ability to restore my account using my previously generated secure phrase

Description

Type: Bug

Summary: Secure Pharse field is only checked for NOT NULL value. No other validation present

Expected behavior

  • exact count of words entered in Secure Phrase field should be 12
  • no dot, comma, numbers, special characters entered

Actual behavior

Reproduction

https://drive.google.com/open?id=0B7h1U1joPifRQ242OGZ1cXZyWHM

Open Status
Set up a password
Remember the secure phrase
Tap Switch Account
Tap Restore Access
Enter anything in the Secure Phrase field and enter password
Tap Restore Access

Additional Information

Operating System: Android
Status version: 0.9.7+ (http://artifacts.status.im:8081/artifactory/nightlies-local/im.status.ethereum-e16b93.apk)
2017_05_20_23_50_32 - logcat.txt

bug wallet

All 8 comments

@asemiankevich for expected result: maybe add validation that

  1. 12 words are entered? not less not more...
  2. no other symbols are enetred (dot, comma, number..)
    Not sure what extra things we can do

i did see several Instabug reports for this as well so we may want to fix this unless it is redesiged with onboarding, then lets close it @annadanchenko

@denis-sharypin is there any redesign for restore access? asking if the issue is worth fixing

Also need to provide explanation text for the user (here should be only 12 words)

@annadanchenko @asemiankevich another thing we can do is following BIP39 and allow users to put 12, 15, 18, 21, or 24 words based on the entropy they had when created.
In Status we actually always create 12 words, but users could be able to create the wallet outside of it.

Another interesting thing is that the words are part of a known set of 2048 words, so we could also validate the words in case the user misspells some.

Conditionals:
— check special characters (dot, comma, numbers, etc)
— check the misspelling of words

If one (or both) of this conditionals are true, we show:
Please double check

cc @jeluard

screenshot 2018-05-25 17 10 24

There is no finite set of words that we can use across all wallet implementations as any is free to choose a different so we should rule this out.

The main issue we were having is people not providing the correct number of words.
When do we want to show this message then? All the time we don't have enough words?
Also how about enabling/disabling the Next button?

After discussing with @denis-sharypin , we will do the following:

  • enable / disable the next button based on passphrase words count
  • sanitize all extra spaces
  • incorrect characters prevent users to hit next

So the error message won't be used (at least with current design).

Was this page helpful?
0 / 5 - 0 ratings