mirror of
https://github.com/retoaccess1/haveno-reto.git
synced 2024-11-10 13:13:36 +01: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