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

Jenkins doesn't escape commas when creating job URLs

      We create a matrix job, which has one of the axis as such:
      "test-124 | -m a,b"
      "test-125 | -m w,z"

      In the job's shell script we cut the 2nd half and turn it into our parameters for our application.
      This fails to create a proper URL for the job.
      Full example (note the "-m%20rc,d%20" - this is the issue):
      http://example.com:8080/view/View/job/HaComb_Snapshots_Test_Suite_Coverage/CMD=x5290_MP_FC_sym50_rcd1+rcd2_raid+on_SnapBackupTest_sas%7C-n%20sym50%20-m%20rc,d%20-r%20--dcbtest%20SnapBackupTest%20-g%20sas,label_exp=sustain&&single&&snap&&BoazS/

      Simple workaround we've used is convert all commas to underscore and later in our script re-set them to commas.

          [JENKINS-24765] Jenkins doesn't escape commas when creating job URLs

          Yaniv Kaul created issue -

          Daniel Beck added a comment -

          Could you please provide detailed and complete steps to reproduce the issue from scratch? Is this about the $JOB_URL or $BUILD_URL environment variable?

          Daniel Beck added a comment - Could you please provide detailed and complete steps to reproduce the issue from scratch? Is this about the $JOB_URL or $BUILD_URL environment variable?

          Yaniv Kaul added a comment -

          Create a matrix job, with these axis:
          axis 1:
          A
          B

          axis 2:
          -m rc,d
          -m e1,e2

          This will result in the following link - which will not escape rc,d (the comma!) when trying to access the job URL.

          BTW, a similar issue we have just found is inability to create a workspace with the '@' character - although it's allowed in the matrix!

          Yaniv Kaul added a comment - Create a matrix job, with these axis: axis 1: A B axis 2: -m rc,d -m e1,e2 This will result in the following link - which will not escape rc,d (the comma!) when trying to access the job URL. BTW, a similar issue we have just found is inability to create a workspace with the '@' character - although it's allowed in the matrix!

          Daniel Beck added a comment -

          Not a core issue, axis are handled by the matrix plugin.

          Daniel Beck added a comment - Not a core issue, axis are handled by the matrix plugin.
          Daniel Beck made changes -
          Component/s New: matrix [ 15501 ]
          Component/s Original: core [ 15593 ]

          Daniel Beck added a comment -

          Duplicates JENKINS-16055, JENKINS-12439, JENKINS-16486. Please search first next time.

          Daniel Beck added a comment - Duplicates JENKINS-16055 , JENKINS-12439 , JENKINS-16486 . Please search first next time.
          Daniel Beck made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Daniel Beck made changes -
          Link New: This issue duplicates JENKINS-12439 [ JENKINS-12439 ]
          Jenkins IRC Bot made changes -
          Component/s New: matrix-project [ 18765 ]
          Component/s Original: matrix [ 15501 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 157803 ] New: JNJira + In-Review [ 195834 ]

            Unassigned Unassigned
            ykaul Yaniv Kaul
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: