mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-22 06:38:55 -04:00
show user friendly error on non-ascii password
This commit is contained in:
parent
d78709e1f9
commit
7243d7fa38
2 changed files with 6 additions and 2 deletions
|
@ -243,6 +243,11 @@ public class KeyStorage {
|
|||
//noinspection ResultOfMethodCallIgnored
|
||||
storageDir.mkdirs();
|
||||
|
||||
// password must be ascii
|
||||
if (password != null && !password.matches("\\p{ASCII}*")) {
|
||||
throw new IllegalArgumentException("Password must be ASCII.");
|
||||
}
|
||||
|
||||
var oldPasswordChars = oldPassword == null ? new char[0] : oldPassword.toCharArray();
|
||||
var passwordChars = password == null ? new char[0] : password.toCharArray();
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue