[plasma/ksshaskpass] src: Don't offer to remember password without identifier
Kai Uwe Broulik <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 91c74d69a56a0d1b2f988c9ba7057d01443d550c by Kai Uwe Broulik.
Committed on 17/08/2026 at 14:09.
Pushed by broulik into branch 'master'.
Don't offer to remember password without identifier
We cannot and won't store it, so don't offer the user something that doesn't work.
M +1 -1 src/main.cpp
https://invent.kde.org/plasma/ksshaskpass/-/commit/91c74d69a56a0d1b2f988c9ba7057d01443d550c
diff --git a/src/main.cpp b/src/main.cpp
index ccb598c..3b139f6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -191,7 +191,7 @@ int main(int argc, char **argv)
case DisplayType::Password: {
// create the password dialog, but only show "Enable Keep" button, if the keychain has a working backend available
KPasswordDialog::KPasswordDialogFlag flag(KPasswordDialog::NoFlags);
- if (QKeychain::isAvailable()) {
+ if (!identifier.isNull() && QKeychain::isAvailable()) {
flag = KPasswordDialog::ShowKeepPassword;
}
QPointer<KPasswordDialog> kpd = new KPasswordDialog(nullptr, flag);