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

Strip input file whitespaces and newlines #7

Merged
merged 1 commit into from
Oct 19, 2024
Merged

Conversation

pshenmic
Copy link
Owner

Issue

Application takes file path of your private key as a command flag, but it does not sanitize whitespaces and newlines, leading to error if your file contains special characters:

thread 'main' panicked at src/commands/register_dpns_name.rs:82:67:
Could not load private key from WIF: Base58(BadByte(10))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Input data should be sanitized before passing down

Things done

  • Added stripping everything over 52 characters for input key data file (wif is 52 chars length) as a temporary solution

@pshenmic pshenmic self-assigned this Oct 19, 2024
@pshenmic pshenmic merged commit 4fe4aa1 into master Oct 19, 2024
1 check passed
@pshenmic pshenmic deleted the fix/strip-files branch October 19, 2024 21:35
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

Successfully merging this pull request may close these issues.

1 participant