https://bugs.kde.org/show_bug.cgi?id=526515

            Bug ID: 526515
           Summary: ksecretd prompts for the wallet password even though
                    no password is set after an idle close; an
                    empty-password wallet should open without a dialog on
                    the Secret Service path
    Classification: Applications
           Product: kwalletmanager
      Version First 26.08.1
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

ksecretd (the Secret Service daemon, part of kf6-kwallet) shows a "Please enter
the password for this wallet" dialog even though the wallet kdewallet has an
empty password. This happens when a Flatpak/Electron app (in my case Teams for
Linux) accesses the wallet after it has been automatically locked by the
idle-close setting (Close When Idle=true, Idle Timeout=10). Native KWallet
clients (e.g. the Nextcloud KDE client) open the same empty-password store
automatically, without a dialog. Same wallet, two code paths, different
behaviour.
Expected: a password-less wallet is opened by both the native KWallet path and
the Secret Service/libsecret path without interaction (or, if not possible, a
message that states no password is set).
Actual: KSecretD::internalOpen() in src/runtime/ksecretd/ksecretd.cpp (~lines
385–447) calls int pwless = b->open(QByteArray(), w); and, when 0 != pwless ||
!b->isOpen(), falls into the dialog:
KPasswordDialog *kpd = new KPasswordDialog();
kpd->setPrompt(i18n("...Please enter the password for this wallet below."...));
For a password-less wallet open(QByteArray()) should return 0 / isOpen()==true
and take the else emptyPass = true; branch — no dialog. The log instead shows
ksecretd: Using kwallet without parent window!, confirming the dialog path.
Timeline (journalctl -b)
18:11:51  kwalletd6-logon.service started (PID 8004)
18:11:56  kwalletd6[8004]: Entry not found ... ServPenta23-..._proxy_password,
folder: Nextcloud
18:24:42  Teams for Linux started
18:24:43  ksecretd[1631]: Using kwallet without parent window!   <-- the
dialog, created here
~/.config/kwalletrc
[Wallet]
Close When Idle=true
Idle Timeout=10
Prompt on Open=true
First Use=false
System
Fedora 44 (x86_64); kf6-kwallet 6.30.0-1.fc44; plasma 6.7.5; pam-kwallet 6.7.5;
Nextcloud (Flatpak); Teams for Linux 2.22.0 (Flatpak).
Reproduction
1. Log in via SSSD/PAM; wallet is empty-password, First Use=false.
2. A native KDE app opens the wallet — no prompt (Nextcloud).
3. Wait past the idle timeout → wallet auto-closes (Close When Idle=true).
4. An Electron/Chromium Flatpak (Teams) starts → ksecretd shows the password
dialog instead of opening the empty-password wallet.
Suggested fix
In internalOpen(): before showing the dialog, detect the wallet is
password-less and use the same mechanism kwalt6 uses natively (e.g.
openPreHashed() with the empty PAM hash) → treat as emptyPass = true. If not
feasible, fix the dialog text to state no password is set. Optionally, avoid
auto-locking an empty-password wallet.
Reliability: 100% with empty password + Close When Idle + Electron/Chromium
Flatpak.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to