Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate fromV3 params #96

Open
alcuadrado opened this issue Jul 31, 2019 · 1 comment
Open

Validate fromV3 params #96

alcuadrado opened this issue Jul 31, 2019 · 1 comment

Comments

@alcuadrado
Copy link
Member

@michaelsbradleyjr commented in this PR that more validations in fromV3 would be useful:

I do think it would be a good idea to do a bit more options checking for uuid, iv, and salt options, i.e. to make sure that they're the expected length and valid hex (per the discussion in Discord last Thursday). Can we introduce that improvement in another PR?

I'm opening this issue to track the suggestion and any possible implementation.

@michaelsbradleyjr
Copy link
Contributor

michaelsbradleyjr commented Aug 26, 2019

I believe the more pressing need is for validations in toV3, and that's now covered pretty well in #95. The reason for the need is that the underlying kdf functions are flexible enough to take bad inputs and generate legit-looking wallets that can't be unencrypted with fromV3.

We could also validate properties within the JSON/object passed to fromV3 and provide helpful error messages to signal to the user that the wallet is malformed (e.g. has a iv property that's too long/short or not valid hex) but I don't think the benefit is substantial. Let me know, though, if you'd like to see a PR for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants