-
Notifications
You must be signed in to change notification settings - Fork 813
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 wallet passwords as UTF-8 #1205
Comments
For reference, newline stripping becomes as straightforward as: fn main() {
println!("{:?}", "mysupersecurepassword\r\n".trim_end_matches(|c| c == '\r' || c == '\n'));
println!("{:?}", "mysupersecurepassword\r\n\r\n\r\r".trim_end_matches(|c| c == '\r' || c == '\n'));
} Which is simpler than working with bytes as in #1199 |
Makes sense to me! |
Oh, I saw this issue only after you had merged the previous PR. Anyway, I have made the update to support UTF-8 here |
I had a couple questions about this after looking at #2070
|
Description
Presently we accept arbitrary bytes from a file as a password, which doesn't seem like the most intuitive UX, particularly when we want to treat it like text and strip out newline characters as per #1175. Making the
PlainText
type contain an actualString
would make the newline stripping a lot cleaner too.The text was updated successfully, but these errors were encountered: