Remove password repeat application setting

* This removes the application setting to require typing the password in again even though it is visible.
* Removed automatic password repeat when the password is made visible on changing.
This commit is contained in:
Jonathan White 2023-08-10 07:57:13 -04:00
parent bb856f89b9
commit 7ae65dd656
8 changed files with 3 additions and 37 deletions

View File

@ -560,10 +560,6 @@
<source>Lock databases after minimizing the window</source> <source>Lock databases after minimizing the window</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Require password repeat when it is visible</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Hide passwords when editing them</source> <source>Hide passwords when editing them</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

View File

@ -137,7 +137,6 @@ static const QHash<Config::ConfigKey, ConfigDirective> configStrings = {
{Config::Security_LockDatabaseMinimize, {QS("Security/LockDatabaseMinimize"), Roaming, false}}, {Config::Security_LockDatabaseMinimize, {QS("Security/LockDatabaseMinimize"), Roaming, false}},
{Config::Security_LockDatabaseScreenLock, {QS("Security/LockDatabaseScreenLock"), Roaming, true}}, {Config::Security_LockDatabaseScreenLock, {QS("Security/LockDatabaseScreenLock"), Roaming, true}},
{Config::Security_RelockAutoType, {QS("Security/RelockAutoType"), Roaming, false}}, {Config::Security_RelockAutoType, {QS("Security/RelockAutoType"), Roaming, false}},
{Config::Security_PasswordsRepeatVisible, {QS("Security/PasswordsRepeatVisible"), Roaming, true}},
{Config::Security_PasswordsHidden, {QS("Security/PasswordsHidden"), Roaming, true}}, {Config::Security_PasswordsHidden, {QS("Security/PasswordsHidden"), Roaming, true}},
{Config::Security_PasswordEmptyPlaceholder, {QS("Security/PasswordEmptyPlaceholder"), Roaming, false}}, {Config::Security_PasswordEmptyPlaceholder, {QS("Security/PasswordEmptyPlaceholder"), Roaming, false}},
{Config::Security_HidePasswordPreviewPanel, {QS("Security/HidePasswordPreviewPanel"), Roaming, true}}, {Config::Security_HidePasswordPreviewPanel, {QS("Security/HidePasswordPreviewPanel"), Roaming, true}},
@ -332,7 +331,7 @@ static const QHash<QString, Config::ConfigKey> deprecationMap = {
{QS("security/passwordscleartext"), Config::Security_PasswordsHidden}, {QS("security/passwordscleartext"), Config::Security_PasswordsHidden},
{QS("security/passwordemptynodots"), Config::Security_PasswordEmptyPlaceholder}, {QS("security/passwordemptynodots"), Config::Security_PasswordEmptyPlaceholder},
{QS("security/HidePasswordPreviewPanel"), Config::Security_HidePasswordPreviewPanel}, {QS("security/HidePasswordPreviewPanel"), Config::Security_HidePasswordPreviewPanel},
{QS("security/passwordsrepeat"), Config::Security_PasswordsRepeatVisible}, {QS("security/passwordsrepeat"), Config::Deleted},
{QS("security/hidenotes"), Config::Security_HideNotes}, {QS("security/hidenotes"), Config::Security_HideNotes},
{QS("KeeShare/Settings.own"), Config::KeeShare_Own}, {QS("KeeShare/Settings.own"), Config::KeeShare_Own},
{QS("KeeShare/Settings.foreign"), Config::KeeShare_Foreign}, {QS("KeeShare/Settings.foreign"), Config::KeeShare_Foreign},
@ -378,7 +377,8 @@ static const QHash<QString, Config::ConfigKey> deprecationMap = {
{QS("Security/ResetTouchIdScreenlock"), Config::Deleted}, {QS("Security/ResetTouchIdScreenlock"), Config::Deleted},
// 2.8.0 // 2.8.0
{QS("GUI/AdvancedSettings"), Config::Deleted}}; {QS("GUI/AdvancedSettings"), Config::Deleted},
{QS("Security/PasswordsRepeatVisible"), Config::Deleted}};
/** /**
* Migrate settings from previous versions. * Migrate settings from previous versions.

View File

@ -118,7 +118,6 @@ public:
Security_LockDatabaseMinimize, Security_LockDatabaseMinimize,
Security_LockDatabaseScreenLock, Security_LockDatabaseScreenLock,
Security_RelockAutoType, Security_RelockAutoType,
Security_PasswordsRepeatVisible,
Security_PasswordsHidden, Security_PasswordsHidden,
Security_PasswordEmptyPlaceholder, Security_PasswordEmptyPlaceholder,
Security_HidePasswordPreviewPanel, Security_HidePasswordPreviewPanel,

View File

@ -318,8 +318,6 @@ void ApplicationSettingsWidget::loadSettings()
m_secUi->passwordPreviewCleartextCheckBox->setChecked( m_secUi->passwordPreviewCleartextCheckBox->setChecked(
config()->get(Config::Security_HidePasswordPreviewPanel).toBool()); config()->get(Config::Security_HidePasswordPreviewPanel).toBool());
m_secUi->hideTotpCheckBox->setChecked(config()->get(Config::Security_HideTotpPreviewPanel).toBool()); m_secUi->hideTotpCheckBox->setChecked(config()->get(Config::Security_HideTotpPreviewPanel).toBool());
m_secUi->passwordsRepeatVisibleCheckBox->setChecked(
config()->get(Config::Security_PasswordsRepeatVisible).toBool());
m_secUi->hideNotesCheckBox->setChecked(config()->get(Config::Security_HideNotes).toBool()); m_secUi->hideNotesCheckBox->setChecked(config()->get(Config::Security_HideNotes).toBool());
m_secUi->NoConfirmMoveEntryToRecycleBinCheckBox->setChecked( m_secUi->NoConfirmMoveEntryToRecycleBinCheckBox->setChecked(
config()->get(Config::Security_NoConfirmMoveEntryToRecycleBin).toBool()); config()->get(Config::Security_NoConfirmMoveEntryToRecycleBin).toBool());
@ -433,7 +431,6 @@ void ApplicationSettingsWidget::saveSettings()
config()->set(Config::Security_HidePasswordPreviewPanel, m_secUi->passwordPreviewCleartextCheckBox->isChecked()); config()->set(Config::Security_HidePasswordPreviewPanel, m_secUi->passwordPreviewCleartextCheckBox->isChecked());
config()->set(Config::Security_HideTotpPreviewPanel, m_secUi->hideTotpCheckBox->isChecked()); config()->set(Config::Security_HideTotpPreviewPanel, m_secUi->hideTotpCheckBox->isChecked());
config()->set(Config::Security_PasswordsRepeatVisible, m_secUi->passwordsRepeatVisibleCheckBox->isChecked());
config()->set(Config::Security_HideNotes, m_secUi->hideNotesCheckBox->isChecked()); config()->set(Config::Security_HideNotes, m_secUi->hideNotesCheckBox->isChecked());
config()->set(Config::Security_NoConfirmMoveEntryToRecycleBin, config()->set(Config::Security_NoConfirmMoveEntryToRecycleBin,
m_secUi->NoConfirmMoveEntryToRecycleBinCheckBox->isChecked()); m_secUi->NoConfirmMoveEntryToRecycleBinCheckBox->isChecked());

View File

@ -186,13 +186,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="passwordsRepeatVisibleCheckBox">
<property name="text">
<string>Require password repeat when it is visible</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QCheckBox" name="passwordsHiddenCheckBox"> <widget class="QCheckBox" name="passwordsHiddenCheckBox">
<property name="text"> <property name="text">
@ -288,7 +281,6 @@
<tabstop>clearSearchSpinBox</tabstop> <tabstop>clearSearchSpinBox</tabstop>
<tabstop>lockDatabaseOnScreenLockCheckBox</tabstop> <tabstop>lockDatabaseOnScreenLockCheckBox</tabstop>
<tabstop>lockDatabaseMinimizeCheckBox</tabstop> <tabstop>lockDatabaseMinimizeCheckBox</tabstop>
<tabstop>passwordsRepeatVisibleCheckBox</tabstop>
<tabstop>passwordsHiddenCheckBox</tabstop> <tabstop>passwordsHiddenCheckBox</tabstop>
<tabstop>passwordShowDotsCheckBox</tabstop> <tabstop>passwordShowDotsCheckBox</tabstop>
<tabstop>passwordPreviewCleartextCheckBox</tabstop> <tabstop>passwordPreviewCleartextCheckBox</tabstop>

View File

@ -148,8 +148,6 @@ void PasswordWidget::setRepeatPartner(PasswordWidget* repeatPartner)
m_repeatPasswordWidget = repeatPartner; m_repeatPasswordWidget = repeatPartner;
m_repeatPasswordWidget->setParentPasswordEdit(this); m_repeatPasswordWidget->setParentPasswordEdit(this);
connect(
m_ui->passwordEdit, SIGNAL(textChanged(QString)), m_repeatPasswordWidget, SLOT(autocompletePassword(QString)));
connect(m_ui->passwordEdit, SIGNAL(textChanged(QString)), m_repeatPasswordWidget, SLOT(updateRepeatStatus())); connect(m_ui->passwordEdit, SIGNAL(textChanged(QString)), m_repeatPasswordWidget, SLOT(updateRepeatStatus()));
} }
@ -178,12 +176,6 @@ void PasswordWidget::setShowPassword(bool show)
if (m_repeatPasswordWidget) { if (m_repeatPasswordWidget) {
m_repeatPasswordWidget->setEchoMode(show ? QLineEdit::Normal : QLineEdit::Password); m_repeatPasswordWidget->setEchoMode(show ? QLineEdit::Normal : QLineEdit::Password);
if (!config()->get(Config::Security_PasswordsRepeatVisible).toBool()) {
m_repeatPasswordWidget->setEnabled(!show);
m_repeatPasswordWidget->setText(text());
} else {
m_repeatPasswordWidget->setEnabled(true);
}
} }
} }
@ -231,14 +223,6 @@ void PasswordWidget::updateRepeatStatus()
} }
} }
void PasswordWidget::autocompletePassword(const QString& password)
{
if (!config()->get(Config::Security_PasswordsRepeatVisible).toBool()
&& m_ui->passwordEdit->echoMode() == QLineEdit::Normal) {
setText(password);
}
}
bool PasswordWidget::event(QEvent* event) bool PasswordWidget::event(QEvent* event)
{ {
if (isVisible() if (isVisible()

View File

@ -61,7 +61,6 @@ protected:
bool event(QEvent* event) override; bool event(QEvent* event) override;
private slots: private slots:
void autocompletePassword(const QString& password);
void popupPasswordGenerator(); void popupPasswordGenerator();
void updateRepeatStatus(); void updateRepeatStatus();
void updatePasswordStrength(const QString& password); void updatePasswordStrength(const QString& password);

View File

@ -35,7 +35,6 @@ void TestConfig::testUpgrade()
Config::createConfigFromFile(tempFile.fileName()); Config::createConfigFromFile(tempFile.fileName());
// value of new setting should be opposite the value of deprecated setting // value of new setting should be opposite the value of deprecated setting
QVERIFY(!config()->get(Config::Security_PasswordsRepeatVisible).toBool());
QVERIFY(!config()->get(Config::Security_PasswordsHidden).toBool()); QVERIFY(!config()->get(Config::Security_PasswordsHidden).toBool());
QVERIFY(config()->get(Config::Security_PasswordEmptyPlaceholder).toBool()); QVERIFY(config()->get(Config::Security_PasswordEmptyPlaceholder).toBool());