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

fix: Quote the username and password in credentials binding #1310

Closed
wants to merge 1 commit into from

Conversation

gabyx
Copy link

@gabyx gabyx commented Aug 11, 2022

JENKINS-27082 - Quote the username and password in credentials binding

Fix wrong quoting in askpass.

Won't solve all cases of quoting but will avoid some common problems related to quoting. For example, if the username or password includes a single quote, then the added quoting will fail. For the more common cases where the username or password contains a special special character that is not a single quote, this pull request will be an improvement.

Checklist

  • I have read the CONTRIBUTING doc
  • I have referenced the Jira issue related to my changes in one or more commit messages
  • I have added tests that verify my changes
  • Unit tests pass locally with my changes
  • I have added documentation as necessary
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • Documentation in README has been updated as necessary
  • Online help has been added and reviewed for any new or modified fields
  • I have interactively tested my changes
  • Any dependent changes have been merged and published in upstream modules (like git-client-plugin)

Types of changes

Correct quoting in bash script.

  • Dependency or infrastructure update
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@MarkEWaite MarkEWaite changed the title Update GitUsernamePasswordBinding.java Quote the username and password in credentials binding Aug 11, 2022
@gabyx gabyx changed the title Quote the username and password in credentials binding fix: Quote the username and password in credentials binding Aug 16, 2022
@gabyx
Copy link
Author

gabyx commented Aug 16, 2022

@MarkEWaite: See the followup #1314 which is a better and refactored solution.
This PR still can go in as a patch first...

@MarkEWaite MarkEWaite added the bugfix Fixes a bug - used by Release Drafter label Sep 3, 2022
@MarkEWaite
Copy link
Contributor

Fixed in #1443 . Thanks for reporting the issue!

@MarkEWaite MarkEWaite closed this Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes a bug - used by Release Drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants