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

Bugfix: WinVaultKeyring.get_credential with non-existent username returns credential of other user (#698) #699

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JamieBeverley
Copy link

Regarding #698

Comment on lines +197 to +198
assert keyring.get_credential(service, "user2").password == password_2

Copy link
Author

@JamieBeverley JamieBeverley Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question/Note:
Considered adding this additional assertion too (see previous commit) but it was failing intermittently on linux.

Sometimes keyring.get_credential(service, None).password would equate to password_2 and sometimes to password_1.

Sticking a time.sleep(1) between the 2 set_password calls above helped it reliably pass so perhaps there's some async/timing thing happening with dbus (can possibly look into that deeper but a bit out of my depths w/ dbus)

Suggested change
assert keyring.get_credential(service, "user2").password == password_2
assert keyring.get_credential(service, "user2").password == password_2
# Most recent entered
assert keyring.get_credential(service, None).password == password_2

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

Successfully merging this pull request may close these issues.

1 participant