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

can not reserve lockable resources with quot in name via UI

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Managing Locks (manually reserve them) via <server-url>/lockable-resources/ does not work if the resource name has quotes in it's name.

      e.g. Resource Name (a JSON String)

      {"server" : "myserver", "cluster" : "cluster-01"}
      

      gives "Uncaught SyntaxError: missing ) after argument list" in the browser console. The reason seems to be that the resource names are used as parameters but are not url-encoded. This is the html part with the syntax error:

      <tr><td class="pane"><strong>{"server" : "myserver", "cluster" : "cluster-01"}</strong><br /><em>Cluster for Integration Tests</em></td><td class="pane" style="color: green;"><strong>FREE</strong></td><td class="pane">nightly</td><td class="pane"><button onClick="reserve_resource_24();">Reserve</button></td></tr><script>function unlock_resource_25() {
      	window.location.assign("unlock?resource={"server" : "myserver", "cluster" : "cluster-01"}");
      }
      function reserve_resource_25() {
      	window.location.assign("reserve?resource={"server" : "myserver", "cluster" : "cluster-01"}");
      }
      function unreserve_resource_25() {
      	window.location.assign("unreserve?resource={"server" : "myserver", "cluster" : "cluster-01"}");
      }
      

       The JavaScript is broken due to the JSONs double quote requirement.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              dageissl Daniel Geißler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: