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

Failure explanation text not sanitized prior to issuing gerrit review command

      If the textual description of the build failure cause contains a single quote, then the notification command to gerrit will fail. For example:

      SEVERE: Could not run command gerrit review 42422,1 --message 'Build Failed 
      
      
      http://leeroy-jenkins/job/<some-job> : SUCCESS
      
      http://leeroy-jenkins/job/<some-other-job>: FAILURE
      
      Gradle couldn't successfully build your target. ( http://leeroy-jenkins//job/<some-other-job> )
      
      http://leeroy-jenkins/job/<yet-another-build> : SUCCESS' --verified -1 --code-review 0
      java.io.IOException: Error during sending command
      at 
      
      <stack trace>
      
      Caused by: com.sonymobile.tools.gerrit.gerritevents.ssh.SshException: fatal: "successfully" is not a valid patch set (1)
      at com.sonymobile.tools.gerrit.gerritevents.ssh.SshConnectionImpl.executeCommand(SshConnectionImpl.java:253)
      
      
      

          [JENKINS-28273] Failure explanation text not sanitized prior to issuing gerrit review command

          Sorin Sbarnea added a comment -

          We encounter the same error quite often now, have a look at some longer logs https://gist.github.com/ssbarnea/0cbad6c4464b0d4bf4e0aec7c03a4b0b

          My impression is that existence of single quotes inside the message will break the execution.

          Sorin Sbarnea added a comment - We encounter the same error quite often now, have a look at some longer logs https://gist.github.com/ssbarnea/0cbad6c4464b0d4bf4e0aec7c03a4b0b My impression is that existence of single quotes inside the message will break the execution.

            t_westling Tomas Westling
            cg Christian Goetze
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: