Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56257

Git clone/fetch filtering user:password from git https://user:pwd@path-2-git

    Details

    • Similar Issues:

      Description

      CliGitApiImpl fetch method is not binding git fetch url correctly, URIished url is binding the args by filtering the user:password in the url with call to url.toString() as against url.toPrivateString() to allow the original url to be passed through.

      It is understood for some git access command like commit can potentially cause issue; and it is valid to filter the user:password for special situation and enforce the security via credentials binding routes.

      Fix is identified and isolated to CliGitApiImpl FetchCommand fetch_() execute method and url binding to args list around line 454 in current version is:

      args.add(url);

      and to be revised as

               args.add(url.toPrivateString());     

       

      Above revision will benefit for scenarios when we create seeding jobs to create another job and pass it parameters. This will also relieve the need to setup credentials in jenkins globally and the callers url is respected for the processing

       

      Thanks

      Sankar

       

        Attachments

          Issue Links

            Activity

            Hide
            ckrams Chandrasekar Sankarram added a comment -

            Hello Mark,

            We need this fix as soon as possible, will fix it and send PR

             

            Thanks

            Sankar

            Show
            ckrams Chandrasekar Sankarram added a comment - Hello Mark, We need this fix as soon as possible, will fix it and send PR   Thanks Sankar
            Show
            ckrams Chandrasekar Sankarram added a comment - Fixed in  https://github.com/jenkinsci/git-client-plugin/pull/416  
            Hide
            markewaite Mark Waite added a comment -

            Included in git client plugin 2.8.5

            Show
            markewaite Mark Waite added a comment - Included in git client plugin 2.8.5

              People

              • Assignee:
                ckrams Chandrasekar Sankarram
                Reporter:
                ckrams Chandrasekar Sankarram
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: