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

Only match credential entries with correct namespace in the Windows Credential Manager #1328

Merged
merged 2 commits into from
Jul 12, 2023

Commits on Jul 11, 2023

  1. wincredmgr: only match cred entries with correct namespace

    GCM by default creates entries in the Windows Credential Manager on
    Windows, and prefixes the 'target name' of the entry with "git:".
    This 'namespace' prefix is configurable, but is not often changed in
    practice outside of tests.
    
    Visual Studio, when adding GitHub accounts (either natively or by the
    older GitHub extension for VS), it creates three credential entries:
    
    1. GitHub for Visual Studio - https://github.com
    2. git:https://github.com
    3. https://github.com
    
    Entry 1 is used by VS for it's own purposes. Entry 2 is created for the
    benefit for GCM, so that we are 'primed'. It is unknown what entry 3 is
    for at this time.
    
    There is an error in our existing logic for enumerating credentials that
    is also matching entry 3 as well as the expected entry 2.
    
    Modify and fix the matching logic to ensure that the namespace prefix
    matches, rather than just stripping it and matching (even if it doesn't
    exist!).
    mjcheetham committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    de7b93b View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. Configuration menu
    Copy the full SHA
    88e1297 View commit details
    Browse the repository at this point in the history