-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
WinVaultKeyring only ever returns last password set #47
Comments
Thanks for this bug report. Your script for reproducing the issue has been incorporated into the test suite as <<changeset 25a620cb2e7e>>. Original comment by: Jason R. Coombs |
(duplicate message removed) Original comment by: Jason R. Coombs |
Someone posted [[http://stackoverflow.com/questions/7806100/mercurial-tortoisehg-keyring-and-using-two-remote-repos-with-two-usernames-and|a question on Stack Overflow]] about this issue. I can also reproduce it myself. Original comment by: Laurens Holst |
If I look at the Credential Manager, it lists: {{{ Looks like it matches on the network address, and the part after the @@ should move there to prevent it from getting replaced? Original comment by: Laurens Holst |
(This is in the context of the Mercurial keyring extension which uses this library. I didn’t realise this was a separate project -_-;;.) Original comment by: Laurens Holst |
I believe there is not a straightforward fix for this issue. I did put together a patch (attached) which simply prepends the username to the servicename in the WinVault target. Although this patch addresses the issue (and causes the failing test to pass), it will have the unfortunate consequence of invalidating all passwords stored by previous versions of keyring. Furthermore, this causes the username to always be stored in the target, even though the username is also specified in the password record, so that field ends up being stored redundantly. It seems the WinVault and python-keyring paradigms are somewhat in conflict here: WinVault expects the target to specify only one password for a given service (per Windows User context), but python-keyring expects to be able to store multiple passwords per service (one additional per username). I'm considering an alternative approach which would maintain backward compatibility, specified thus:
I realize this seems unnecessarily convoluted, but it serves two major benefits:
I'll mull this over for a while, but I'd like to hear feedback from the community as well if there are any opinions on this issue. Original comment by: Jason R. Coombs |
Fixed in <> Original comment by: Jason R. Coombs |
WinVaultKeyring appears to only ever returns last password set. Win32CryptoKeyring works as expected.
The text was updated successfully, but these errors were encountered: