Skip to content

Strip usernames from URLs as well as passwords#1437

Merged
Byron merged 1 commit intogitpython-developers:mainfrom
glennmatthews:issue-1284
May 5, 2022
Merged

Strip usernames from URLs as well as passwords#1437
Byron merged 1 commit intogitpython-developers:mainfrom
glennmatthews:issue-1284

Conversation

@glennmatthews
Copy link
Contributor

Fixes #1284

  • Extend remove_password_if_present to remove usernames from URLs as well as the existing behavior of removing passwords from URLs.
  • As an extra level of caution, I extended CommandError.__init__ to also call remove_password_if_present just in case an exception gets raised from a non-sanitized command by mistake.
  • Add test coverage for both of the above changes.

@Byron
Copy link
Member

Byron commented May 5, 2022

Thanks a lot for your contribution!

I particularly like that there are tests for all changes (which I assume break without these modifications).

@Byron Byron merged commit b3166ec into gitpython-developers:main May 5, 2022
@Byron Byron added this to the v3.1.28 - Bugfixes milestone May 5, 2022
@glennmatthews glennmatthews deleted the issue-1284 branch May 5, 2022 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Github token is leaked when used as a part of remote URL

2 participants