Don't accept empty passwords
This commit is contained in:
@@ -225,7 +225,7 @@ void MainWindow::encryptWallet() {
|
|||||||
auto encStatus = rpc->getModel()->getEncryptionStatus();
|
auto encStatus = rpc->getModel()->getEncryptionStatus();
|
||||||
if (encStatus.first) {
|
if (encStatus.first) {
|
||||||
QMessageBox::information(this, tr("Wallet is already encrypted"),
|
QMessageBox::information(this, tr("Wallet is already encrypted"),
|
||||||
tr("Your wallet is already encrypted with a password.\nPlease use 'Remove Wallet Encryption if you want to remove the wallet encryption."),
|
tr("Your wallet is already encrypted with a password.\nPlease use 'Remove Wallet Encryption' if you want to remove the wallet encryption."),
|
||||||
QMessageBox::Ok
|
QMessageBox::Ok
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@@ -248,11 +248,12 @@ void MainWindow::encryptWallet() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ed.txtPassword->setText("");
|
|
||||||
|
|
||||||
QObject::connect(ed.txtConfirmPassword, &QLineEdit::textChanged, fnPasswordEdited);
|
QObject::connect(ed.txtConfirmPassword, &QLineEdit::textChanged, fnPasswordEdited);
|
||||||
QObject::connect(ed.txtPassword, &QLineEdit::textChanged, fnPasswordEdited);
|
QObject::connect(ed.txtPassword, &QLineEdit::textChanged, fnPasswordEdited);
|
||||||
|
|
||||||
|
ed.txtPassword->setText("");
|
||||||
|
ed.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||||
|
|
||||||
auto fnShowError = [=](QString title, const json& res) {
|
auto fnShowError = [=](QString title, const json& res) {
|
||||||
QMessageBox::critical(this, title,
|
QMessageBox::critical(this, title,
|
||||||
tr("Error was:\n") + QString::fromStdString(res.dump()),
|
tr("Error was:\n") + QString::fromStdString(res.dump()),
|
||||||
|
|||||||
Reference in New Issue
Block a user