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

can not reserve lockable resources with quot in name via UI

    Details

    • Similar Issues:
    • Released As:
      lockable-resources 2.5?

      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

          dageissl Daniel Geißler created issue -
          tgr Tobias Gruetzmacher made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Tobias Gruetzmacher [ tgr ]
          Resolution Fixed [ 1 ]
          Released As lockable-resources 2.5?

            People

            • Assignee:
              tgr Tobias Gruetzmacher
              Reporter:
              dageissl Daniel Geißler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: