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

Jenkins doesn't escape commas when creating job URLs

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            danielbeck Daniel Beck added a comment -

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

            danielbeck Daniel Beck added a comment - Duplicates JENKINS-16055 , JENKINS-12439 , JENKINS-16486 . Please search first next time.
            danielbeck Daniel Beck added a comment -

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

            danielbeck Daniel Beck added a comment - Not a core issue, axis are handled by the matrix plugin.
            ykaul 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!

            ykaul 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!
            danielbeck 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?

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

            People

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

              Dates

                Created:
                Updated:
                Resolved: