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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • Component/s: envinject-plugin
    • Environment:
      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"}

      ...

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

              Created:
              Updated:
              Resolved: