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

[bug] Reversed logic in WindowsCredentialManager for matching port number #747

Closed
samuel-lee-msft opened this issue Jun 16, 2022 · 0 comments · Fixed by #748
Closed

[bug] Reversed logic in WindowsCredentialManager for matching port number #747

samuel-lee-msft opened this issue Jun 16, 2022 · 0 comments · Fixed by #748
Assignees
Labels
bug A bug in Git Credential Manager platform:windows Specific to the Windows platform

Comments

@samuel-lee-msft
Copy link

Looking at the WindowsCredentialManager code, I spotted a logic error when matching the port number in a stored credential:
https://github.com/GitCredentialManager/git-credential-manager/blob/3ff096f91ce09d11ecbaca1e1f55f31cf2aece8e/src/shared/Core/Interop/Windows/WindowsCredentialManager.cs#L296

Currently if the port numbers match, the IsMatch function returns not a match, and vice versa. This could lead to confusing authentication issues if a user were to clone a repo specifying a port number.

@mjcheetham mjcheetham self-assigned this Jun 16, 2022
@mjcheetham mjcheetham added bug A bug in Git Credential Manager platform:windows Specific to the Windows platform labels Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in Git Credential Manager platform:windows Specific to the Windows platform
Projects
None yet
2 participants