[JIRA] (JENKINS-40166) Passwords not quoted correctly in Windows

2017-01-17 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite resolved as Fixed  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Fixed in git client plugin 2.2.1 16 Jan 2016  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-40166  
 
 
  Passwords not quoted correctly in Windows   
 

  
 
 
 
 

 
Change By: 
 Mark Waite  
 
 
Status: 
 Open Resolved  
 
 
Resolution: 
 Fixed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-40166) Passwords not quoted correctly in Windows

2017-01-16 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-40166  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Passwords not quoted correctly in Windows   
 

  
 
 
 
 

 
 If you'd like to test a prototype build, for a short time it will be available from the ci.jenkins.io server. Upload it manually, restart your Jenkins server, and see if it helps in your case.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-40166) Passwords not quoted correctly in Windows

2016-12-21 Thread letterle+jenk...@prokrams.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michael Letterle commented on  JENKINS-40166  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Passwords not quoted correctly in Windows   
 

  
 
 
 
 

 
 This was a blocking issue for us, so I went ahead and implemented this simplest fix possible and submitted a pull request: https://github.com/jenkinsci/git-client-plugin/pull/231 Using bash on Windows is probably a better answer, but was more interested in getting my builds up and running quickly   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-40166) Passwords not quoted correctly in Windows

2016-12-01 Thread freder...@staats.org (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederick Staats edited a comment on  JENKINS-40166  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Passwords not quoted correctly in Windows   
 

  
 
 
 
 

 
 I agree that a temporary password file is a better fix than my first suggestion.  I had only suggested the smallest possible change, not the most general change.Please note that all versions of Git for Windows ship with bash.exe out of the box in the same folder as git.exe (you can always use the path to git.exe as the path to bash.exe regardless of what %PATH% is set to).Type.exe has the problem that it is not always on the users path in Windows, but bash.exe is always next to git.exe.  You can use bash's builtin file redirection and printf without having any other executable on your path:bash.exe --noprofile -c 'printf %s "$(

[JIRA] (JENKINS-40166) Passwords not quoted correctly in Windows

2016-12-01 Thread freder...@staats.org (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederick Staats edited a comment on  JENKINS-40166  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Passwords not quoted correctly in Windows   
 

  
 
 
 
 

 
 I agree that a temporary password file is a better fix than my first suggestion.  I had only suggested the smallest possible change, not the most general change.Please note that all versions of Git for Windows ship with bash.exe out of the box in the same folder as git.exe (you can always use the path to git.exe as the path to bash.exe regardless of what %PATH% is set to).Type.exe has the problem that it is not always on the users path in Windows, but bash.exe is always next to git.exe.  You can use bash's builtin file redirection and printf without having any other executable on your path:bash.exe --noprofile -c 'printf %s "$(

[JIRA] (JENKINS-40166) Passwords not quoted correctly in Windows

2016-12-01 Thread freder...@staats.org (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederick Staats edited a comment on  JENKINS-40166  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Passwords not quoted correctly in Windows   
 

  
 
 
 
 

 
 I agree that a temporary password file is a better fix than my first suggestion.  I had only suggested the smallest possible change, not the most general change.Please note that all versions of Git for Windows ship with bash.exe out of the box in the same folder as git.exe (you can always use the path to git.exe as the path to bash.exe regardless of what %PATH% is set to).Type.exe has the problem that it is not always on the users path in Windows, but bash.exe is always next to git.exe.  You can use bash's builtin file redirection and printf without having any other executable on your path:bash.exe --noprofile -c 'printf %s "$(

[JIRA] (JENKINS-40166) Passwords not quoted correctly in Windows

2016-12-01 Thread freder...@staats.org (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederick Staats commented on  JENKINS-40166  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Passwords not quoted correctly in Windows   
 

  
 
 
 
 

 
 I agree that a temporary password file is a better fix than my first suggestion. I had only suggested the smallest possible change, not the most general change. Please note that all versions of Git for Windows ship with bash.exe out of the box in the same folder as git.exe (you can always use the path to git.exe as the path to bash.exe regardless of what %PATH% is set to). Type.exe has the problem that it is not always on the users path in Windows, but bash.exe is always next to git.exe. You can use bash's builtin file redirection and printf without having any other executable on your path: bash.exe --noprofile -c 'printf %s "$(

[JIRA] (JENKINS-40166) Passwords not quoted correctly in Windows

2016-12-01 Thread mark.earl.wa...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Mark Waite commented on  JENKINS-40166  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Passwords not quoted correctly in Windows   
 

  
 
 
 
 

 
 Git client plugin pull request PR207 has started the process of investigating the quoting problem. I think there is a better way which completely avoids the "shell escaping" problem. Refer to my master-PR207-exploring branch for an implementation which uses type (windows) and cat (unix) rather than echo. I think type and cat are better choices because the password can be written to a file without any escaping, then the cat (or type) command reports the contents of that file on a pipe to the git command.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-40166) Passwords not quoted correctly in Windows

2016-12-01 Thread freder...@staats.org (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederick Staats commented on  JENKINS-40166  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Passwords not quoted correctly in Windows   
 

  
 
 
 
 

 
 Can't figure out how to link issues, please note JENKINS-38194 is a subset of this quoting issue (only referring to the ampersand character.)  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-40166) Passwords not quoted correctly in Windows

2016-12-01 Thread freder...@staats.org (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Frederick Staats created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-40166  
 
 
  Passwords not quoted correctly in Windows   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Mark Waite  
 
 
Components: 
 git-client-plugin  
 
 
Created: 
 2016/Dec/01 7:57 PM  
 
 
Environment: 
 Windows  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Frederick Staats  
 

  
 
 
 
 

 
 In https://github.com/jenkinsci/git-client-plugin/blob/master/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java Method createWindowsStandardAskpass() & createWindowsSshAskpass() create cmd.exe .bat batch files are created that echo the passwords to standard out. They use this method to encode the password: private String quoteWindowsCredentials(String str)  { // Assumes the only meaningful character is %, this may be // insufficient.* return str.replace("%", "%%"); } This misses several characters are missed that also need to be quoted, see http://ss64.com/nt/syntax-esc.html for more specifics. Specifically the cmd.exe caret ^ escape character is needed to quote backslash, ampersand, right bracket, left bracket, caret, space and tab characters:  ^\ ^& ^| ^> ^< ^^ ^ (note there is a space) and ^ (note there is a tab) This could easily be implemented by adding additional lines to the method for each of these extra characters. Currently when you use these characters in a Git password and run the job on windows you get very poor error messages saying that the fetch operation failed do to an error in ASKPASS.