Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Strip usernames from URLs as well as passwords#1437

Merged
Byron merged 1 commit into
gitpython-developers:maingitpython-developers/GitPython:mainfrom
glennmatthews:issue-1284Copy head branch name to clipboard
May 5, 2022
Merged

Strip usernames from URLs as well as passwords#1437
Byron merged 1 commit into
gitpython-developers:maingitpython-developers/GitPython:mainfrom
glennmatthews:issue-1284Copy head branch name to clipboard

Conversation

@glennmatthews

Copy link
Copy Markdown
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

Byron commented May 5, 2022

Copy link
Copy Markdown
Member

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.