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

Jenkins improperly handles single quotes in item names

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • 1.625.2

      Jenkins does not prohibit creating of items like "Mike's test project". So you can create this item, but after that you won't be able to reliably access it.

      URL path shows "Problem accessing /job/Mike/'s/%20test%project".

      • The item cannot be opened within a folder
      • Field verification does not work in the item's configuration forms

          [JENKINS-31871] Jenkins improperly handles single quotes in item names

          Oleg Nenashev added a comment -

          Workaround: Specify the project naming restriction patterns to warn users about the issue (see the attached screenshot)

          Oleg Nenashev added a comment - Workaround: Specify the project naming restriction patterns to warn users about the issue (see the attached screenshot)

          Daniel Beck added a comment - - edited

          * The item cannot be opened within a folder

          Cannot reproduce the problem on my system (behind Apache reverse proxy). Full project name: EXPERIMENTS/foo'br can be accessed without problem.

          Field verification does not work in the item's configuration forms

          That's because of a bug in FormValidation.CheckMethod or its use in the UI.

          Daniel Beck added a comment - - edited * The item cannot be opened within a folder Cannot reproduce the problem on my system (behind Apache reverse proxy). Full project name: EXPERIMENTS/foo'br can be accessed without problem. Field verification does not work in the item's configuration forms That's because of a bug in FormValidation.CheckMethod or its use in the UI.

          Félix Belzunce Arcos added a comment - - edited

          I was not able to re-produce the fact that the item with singles quotes cannot be opened within a folder. However, the Field verification is really an issue as Daniel Beck said.

          oleg_nenashev What Jenkins version were you using?

          Félix Belzunce Arcos added a comment - - edited I was not able to re-produce the fact that the item with singles quotes cannot be opened within a folder. However, the Field verification is really an issue as Daniel Beck said. oleg_nenashev What Jenkins version were you using?

          Code changed in jenkins
          User: Felix Belzunce Arcos
          Path:
          core/src/main/java/hudson/util/FormValidation.java
          http://jenkins-ci.org/commit/jenkins/bee66ede31d45b9d0814e4a45cbf2223585817e2
          Log:
          [FIXED JENKINS-31871] Properly handle single quotes in item names (#1943)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Felix Belzunce Arcos Path: core/src/main/java/hudson/util/FormValidation.java http://jenkins-ci.org/commit/jenkins/bee66ede31d45b9d0814e4a45cbf2223585817e2 Log: [FIXED JENKINS-31871] Properly handle single quotes in item names (#1943)

          Daniel Beck added a comment -

          FWIW I'd like to wait a bit longer with this change, to see whether someone/something is using the obscure feature we possibly broke.

          Daniel Beck added a comment - FWIW I'd like to wait a bit longer with this change, to see whether someone/something is using the obscure feature we possibly broke.

            fbelzunc Félix Belzunce Arcos
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: