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

Strings are not properly escaped when converting to JSON during various operations

XMLWordPrintable

      The various blocks of code that build up JSON in RESTClient.java do not escape the strings added to the overall JSON string. This was discovered by adding a JQL query that had double quotes in it. The REST API returned a 400:

      Failed with 400: project=TEST AND text~"Customer Reported Bug"

      Worked: project=TEST AND text~\"Customer Reported Bug\"

      It looks like this is an issue with all JSON string building.

            Unassigned Unassigned
            dstruct J D
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: