Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QtKeyhcain: DeletePasswordJob with KWallet does not delete, but creates an empty entry instead #9064

Closed
TheOneRing opened this issue Sep 21, 2021 · 8 comments

Comments

@TheOneRing
Copy link
Contributor

#9019 (comment)

I had a quick look:

2.8.1 creates a password entry in the format of username:https://host/:0 with the password, nothing else.

The 2.9 branch reads this, and then tries to delete a nonexistant username:https://host/ entry. For some reason (removeEntry seems to be dead code), QtKeychain instead calls writePassword with empty data, so it creates an empty entry instead of doing nothing...

On top of that QtKeychain bug there is another weirdness which I can't explain so far: The account is "offline" immediately after migration, and I need to restart the client to trigger a connection. Could be some missing signal emission or something like that.

Are you using the appimage? Where there warnings from qtkeychain?

@Vogtinator
Copy link

Are you using the appimage?

No, I built from the 2.9 branch manually, against libqt5keychain1-0.12.0-2.5.x86_64.

Where there warnings from qtkeychain?

Only Could not load qtkeychain translations

@TheOneRing
Copy link
Contributor Author

So I had issues before but it turned out that my qtkeychain was build without support for lib secret.
08-20 13:35:43:674 [ debug default ] [ LibSecretKeyring::deletePassword ]: static bool LibSecretKeyring::deletePassword(const QString&, const QString&, QKeychain::JobPrivate*)

So the client switched between libsecret and gnome keything, and lost the pw on the way.

@Vogtinator
Copy link

Vogtinator commented Sep 21, 2021

I'm using kwallet and it's using the kwallet methods in qtkeychain properly.

My theory is that https://github.com/frankosterfeld/qtkeychain/blob/c729d0bc3a7d0932cbcacc773a98ea8660064fc0/keychain_unix.cpp#L520 is never reached because mode is always either Text or Binary. That's a bug which owncloud-client could only work around by just not attempting to delete keys unfortunately.

However, that might not be necessary because the old password is read properly before the old keys are "deleted", so the new entry can be written with the correct content at this point. With the new entry, the old entries not being deleted properly shouldn't matter anymore.

@TheOneRing
Copy link
Contributor Author

Huh maybe time to open an issue in qtkeychain I didn't realise that this is an upstream issue before.

@Vogtinator
Copy link

Done: frankosterfeld/qtkeychain#199

Working around that in the client should be possible by not reading the old password twice

@TheOneRing TheOneRing changed the title 2.9 keyhcain migrations issues QtKeyhcain: DeletePasswordJob with KWallet does not delete, but creates an empty entry instead Sep 21, 2021
@github-actions
Copy link

This issue was marked stale because it has been open for 30 days with no activity. Remove the stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 22, 2021
@TheOneRing TheOneRing removed the Stale label Oct 22, 2021
@TheOneRing TheOneRing added this to the Backlog milestone Oct 22, 2021
@TheOneRing
Copy link
Contributor Author

Fixed in 0.13.1.
Will be part of 2.10 for app images.
@fmoc anything needed for obs?

@TheOneRing
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants