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

Strip usernames from URLs as well as passwords #1437

Merged
merged 1 commit into from
May 5, 2022
Merged

Strip usernames from URLs as well as passwords #1437

merged 1 commit into from
May 5, 2022

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