mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-28 08:49:45 -05:00
account service checks that password is at least 8 characters
This commit is contained in:
parent
b585e0f105
commit
99653fe40d
@ -117,6 +117,7 @@ public class CoreAccountService {
|
||||
public void changePassword(String oldPassword, String newPassword) {
|
||||
if (!isAccountOpen()) throw new IllegalStateException("Cannot change password on unopened account");
|
||||
if (!StringUtils.equals(this.password, oldPassword)) throw new IllegalStateException("Incorrect password");
|
||||
if (newPassword != null && newPassword.length() < 8) throw new IllegalStateException("Password must be at least 8 characters");
|
||||
keyStorage.saveKeyRing(keyRing, oldPassword, newPassword);
|
||||
this.password = newPassword;
|
||||
synchronized (listeners) {
|
||||
|
Loading…
Reference in New Issue
Block a user