mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Warn user when no authentication factor was chosen
This commit is contained in:
parent
5d068dfb23
commit
2d4e08e060
@ -118,12 +118,24 @@ void ChangeMasterKeyWidget::generateKey()
|
|||||||
{
|
{
|
||||||
m_key.clear();
|
m_key.clear();
|
||||||
|
|
||||||
|
bool anyChecked = m_ui->passwordGroup->isChecked();
|
||||||
|
anyChecked |= m_ui->keyFileGroup->isChecked();
|
||||||
|
anyChecked |= m_ui->challengeResponseGroup->isChecked();
|
||||||
|
|
||||||
|
if (!anyChecked) {
|
||||||
|
if (MessageBox::warning(this, tr("No authentication factor chosen"),
|
||||||
|
tr("Your database will be completely unprotected!<br>Do you really want to continue?"),
|
||||||
|
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (m_ui->passwordGroup->isChecked()) {
|
if (m_ui->passwordGroup->isChecked()) {
|
||||||
if (m_ui->enterPasswordEdit->text() == m_ui->repeatPasswordEdit->text()) {
|
if (m_ui->enterPasswordEdit->text() == m_ui->repeatPasswordEdit->text()) {
|
||||||
if (m_ui->enterPasswordEdit->text().isEmpty()) {
|
if (m_ui->enterPasswordEdit->text().isEmpty()) {
|
||||||
if (MessageBox::question(this, tr("Question"),
|
if (MessageBox::warning(this, tr("Empty password"),
|
||||||
tr("Do you really want to use an empty string as password?"),
|
tr("Do you really want to use an empty string as password?"),
|
||||||
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
|
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user