linux: Fix KeePassXC integration via org.freedesktop.Secrets (#33026)

Closes #29956

Unlike GNOME Keyring, KeePassXC locks individual secrets in addition to
the entire database when configured to ask for confirmation for access
requests by DBus clients. As such, before the secret is read it should
be unlocked by the client.

Tested against both KeePassXC and GNOME Keyring, and with this patch Zed
successfully logs in and fetches the API keys from the Secret Service.

Release Notes:

- Fixed KeePassXC integration via org.freedesktop.Secrets
This commit is contained in:
Artem Zhurikhin 2025-06-23 02:57:45 +02:00 committed by GitHub
parent ac30a8b0df
commit 67ac80bd19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -491,6 +491,7 @@ impl<P: LinuxClient + 'static> Platform for P {
let username = attributes
.get("username")
.context("Cannot find username in stored credentials")?;
item.unlock().await?;
let secret = item.secret().await?;
// we lose the zeroizing capabilities at this boundary,