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

Export of Variables over api creates invalid JSON if escaping is required

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • envinject-plugin
    • Jenkins 1.644 (deb package)

      If you have an env variable with e.g. double quotation marks a call to job/<name>/<buildid>//injectedEnvVars/export/api/json will create invalid JSON.

      If for example if the Variable is declared as
      export VAR='test"test"test'
      it would create the following output
      ...

      {"name":"VAR", "value":"test"test"test"}

      ...

            oleg_nenashev Oleg Nenashev
            juergen_thomann Jürgen Thomann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: