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

fix(wincred): Encode passwords to UTF-16 #335

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bubichoo-Teitichoo
Copy link

@Bubichoo-Teitichoo Bubichoo-Teitichoo commented Sep 11, 2024

This change adds UTF-16 encoding to the Windows credential helper.

As recommended by the author of the wincred library, the password should be encoded to allow other applications to use the same password.

This is especially needed when the docker image repository is hosted on a JFrog Artifactory, that also hosts Python repositories. Because nobody wants to store their credentials in as plain test within the pip.ini, they're going to enable the keyring support for pip, which in turn uses the Win32API that assumes that the password is a UTF-16 encoded string.
Since this is not the case pip will crash with an encoding error.

Disclaimer: I have never used go before. I'm not sure if I have added the dependency as correctly.

Signed-off-by: Philipp Krüger <github.khab3@passinbox.com>
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