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

Cannot configure job if the job name contains single quote

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • Ubuntu 11.10, Google Chrome 17.0.963.79

      Steps:

      1. Create a new job with name of "This won't work" (without double quotes)
      2. Go to the Configure page of the job you have just created

      The page keeps loading and seems to be broken

          [JENKINS-13121] Cannot configure job if the job name contains single quote

          jul created issue -
          jieryn made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: config-autorefresh [ 15871 ]
          Assignee Original: jieryn [ jieryn ]

          Kieran Shaw added a comment -

          Appears to be here:

          "function registerValidator(e) {
          e.targetElement = findFollowingTR(e, "validation-error-area").firstChild.nextSibling;
          e.targetUrl = function()

          { return eval(this.getAttribute("checkUrl")); }

          ;"

          Where "this.getAttribute("checkUrl")" blows up because checkUrl contains something like: "'/checkDisplayName?displayName='encodeURIComponent(this.value)'&jobName='+encodeURIComponent('Job with single'quote')"

          Kieran Shaw added a comment - Appears to be here: "function registerValidator(e) { e.targetElement = findFollowingTR(e, "validation-error-area").firstChild.nextSibling; e.targetUrl = function() { return eval(this.getAttribute("checkUrl")); } ;" Where "this.getAttribute("checkUrl")" blows up because checkUrl contains something like: "'/checkDisplayName?displayName=' encodeURIComponent(this.value) '&jobName='+encodeURIComponent('Job with single'quote')"

          I have also experienced this issue in our Jenkins 1.478 on Windows Server 2003. I've confirmed the issue in IE, Firefox, Chrome, and Opera.

          David Schamber added a comment - I have also experienced this issue in our Jenkins 1.478 on Windows Server 2003. I've confirmed the issue in IE, Firefox, Chrome, and Opera.

          evernat added a comment -

          I do not reproduce the issue using Jenkins 1.534 and Firefox or Chrome.
          Can we close this?

          evernat added a comment - I do not reproduce the issue using Jenkins 1.534 and Firefox or Chrome. Can we close this?

          Daniel Beck added a comment -

          Cannot reproduce in 1.563. Browser console also shows numerous successful requests that seem related, e.g.

          http://localhost:8080/job/This%20won%27t%20work/descriptorByName/hudson.model.FreeStyleProject/checkAssignedLabelString?value=
          

          Daniel Beck added a comment - Cannot reproduce in 1.563. Browser console also shows numerous successful requests that seem related, e.g. http: //localhost:8080/job/This%20won%27t%20work/descriptorByName/hudson.model.FreeStyleProject/checkAssignedLabelString?value=
          Daniel Beck made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Juhana Harmanen added a comment - - edited

          Env: Jenkins 1.589 on Centos 6.5
          Browser: Chrome 38.0.2125.111 on Windows 8.1

          Problem: Job with a Maven project name containing 'something' in between. For example, Job with a name: CI build and Test 'master' branch

          When trying to re-configure the Job:

          • stalls on Loading (which doesn't actually prevent trying to edit, since not spanning over the whole view)
          • from the failing 404 GET requests one can identify that it appends / char before ' char on some requests. By executing these request directly without the appended / character before the ' char they do work.
          • One can swap through the HTML elements with tab and press to Save (wanted to fix the Job by renaming the project) which produces an Error: JSONObject["scm"] is not a JSONObject

          When trying to Delete Maven Project:

          • Uncaught SyntaxError: Unexpected identifier

          Juhana Harmanen added a comment - - edited Env: Jenkins 1.589 on Centos 6.5 Browser: Chrome 38.0.2125.111 on Windows 8.1 Problem: Job with a Maven project name containing 'something' in between. For example, Job with a name: CI build and Test 'master' branch When trying to re-configure the Job: stalls on Loading (which doesn't actually prevent trying to edit, since not spanning over the whole view) from the failing 404 GET requests one can identify that it appends / char before ' char on some requests. By executing these request directly without the appended / character before the ' char they do work. One can swap through the HTML elements with tab and press to Save (wanted to fix the Job by renaming the project) which produces an Error: JSONObject ["scm"] is not a JSONObject When trying to Delete Maven Project: Uncaught SyntaxError: Unexpected identifier
          Juhana Harmanen made changes -
          Attachment New: jenkins_error.png [ 28015 ]
          Attachment New: jenkins_failing_requests.png [ 28016 ]
          Juhana Harmanen made changes -
          Attachment New: jenkins_failing_requests.png [ 28017 ]

            Unassigned Unassigned
            julienarchille jul
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: