Fix KeePassXC Secret Service support - #1
Open
urrpurr wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When KeePassXC is the org.freedesktop.secrets provider, two bugs made it
unusable (this is the fork Komelia bundles; relates to Komelia#1):
1. Startup crash —
ArrayIndexOutOfBoundsExceptionMessageHandler.sendreadsparameters[0]when a reply is a D-Bus error.KeePassXC returns error replies with an empty body (e.g.
IsLocked),so
parametersis zero-length and the access throws, killing the app onlaunch. Guarded the access. (Mainline swiesend
v3.0.0-alphaalready hasthis guard — this just brings the fork current.)
2. Logins never remembered — read always returns
IsLockedSimpleCollection.getSecretcallsunlock(), which only unlocks thecollection. KeePassXC locks items independently: the collection
reports unlocked (so
unlock()no-ops) while the item stays locked, soitem.getSecretreturnsIsLockedand no secret comes back — the user isre-prompted every launch. Now the item is unlocked explicitly before reading.
With both fixes, KeePassXC works end-to-end: login persists across restarts.
Verified on Arch Linux, KeePassXC 2.7.12, Komelia 0.18.5