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

Jenkins improperly handles single quotes in item names

    XMLWordPrintable

Details

    Description

      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

      Attachments

        Issue Links

          Activity

            oleg_nenashev Oleg Nenashev added a comment -

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

            oleg_nenashev Oleg Nenashev added a comment - Workaround: Specify the project naming restriction patterns to warn users about the issue (see the attached screenshot)
            danielbeck 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.

            danielbeck 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.
            fbelzunc 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?

            fbelzunc 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_issue_link 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)
            danielbeck 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.

            danielbeck 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.

            People

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

              Dates

                Created:
                Updated:
                Resolved: