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

Missing URL escaping for job names containing "/"

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • blueocean-plugin
    • None

      We are using the Bitbucket Branch Source Plugin, which creates job names like 'Project/Repo'. Opening those jobs in Blue Ocean results in a 404 page, because the "/" in the job name is interpreted as being part of the URL. Replacing the "/" with "%2F" results in the pages to load correctly.

          [JENKINS-44190] Missing URL escaping for job names containing "/"

          Heinz Wiesinger created issue -

          James Dumay added a comment -

          pprkut there are certainly some stage behaviours with the Bitbucket branch source with Blue Ocean. I suspect there is some encoding issues on the Bitbucket branch source that are related to JENKINS-41407 that could be the root cause here.

          Bitbucket support is coming up on our roadmap soon and we hope to clean up a bunch of problems like the one you are describing. I've added this to our Bitbucket Support epic.

          James Dumay added a comment - pprkut there are certainly some stage behaviours with the Bitbucket branch source with Blue Ocean. I suspect there is some encoding issues on the Bitbucket branch source that are related to JENKINS-41407 that could be the root cause here. Bitbucket support is coming up on our roadmap soon and we hope to clean up a bunch of problems like the one you are describing. I've added this to our Bitbucket Support epic.
          James Dumay made changes -
          Epic Link New: JENKINS-41404 [ 178186 ]

          James Dumay added a comment - - edited

          pprkut I just played around with jobs with slashes in it and it looks like we are now encoding things correctly with the latest Bitbucket and Blue Ocean plugins.

          See screencast https://www.dropbox.com/s/50v49xwyz6fqkvl/url-paths.gif?dl=0

          James Dumay added a comment - - edited pprkut I just played around with jobs with slashes in it and it looks like we are now encoding things correctly with the latest Bitbucket and Blue Ocean plugins. See screencast https://www.dropbox.com/s/50v49xwyz6fqkvl/url-paths.gif?dl=0

          James Dumay added a comment -

          pprkut I am going to close this for the moment however if this is still a problem for you and you can provide me some step by step reproduction instructions I'd be more than happy to take a deeper dive

          James Dumay added a comment - pprkut I am going to close this for the moment however if this is still a problem for you and you can provide me some step by step reproduction instructions I'd be more than happy to take a deeper dive
          James Dumay made changes -
          Resolution New: Cannot Reproduce [ 5 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Is this with the latest code in git or with the latest releases? I just applied all available updates here, but that didn't seem to change anything.

          Heinz Wiesinger added a comment - Is this with the latest code in git or with the latest releases? I just applied all available updates here, but that didn't seem to change anything.

          James Dumay added a comment -

          pprkut I used all the latest plugins and Blue Ocean 1.1-beta4 from the experimental update center.

          James Dumay added a comment - pprkut I used all the latest plugins and Blue Ocean 1.1-beta4 from the experimental update center .

          Ok, so with the latest beta versions I can confirm that URLs are working correctly in Blue Ocean.

          However, going from Classic to Blue Ocean via the "Open Blue Ocean" URL is still not working. What happens is this:
          The link in the classic UI is: https://jenkins.example.com/blue/organizations/jenkins/bb%2Fproject/branches
          This returns a 302 response code, with a Location value that's now wrong: https://jenkins.example.com/blue/organizations/jenkins/bb/project/branches/
          (Note the slash at the end, which is the actual reason for the 302 redirection)

          Heinz Wiesinger added a comment - Ok, so with the latest beta versions I can confirm that URLs are working correctly in Blue Ocean. However, going from Classic to Blue Ocean via the "Open Blue Ocean" URL is still not working. What happens is this: The link in the classic UI is: https://jenkins.example.com/blue/organizations/jenkins/bb%2Fproject/branches This returns a 302 response code, with a Location value that's now wrong: https://jenkins.example.com/blue/organizations/jenkins/bb/project/branches/ (Note the slash at the end, which is the actual reason for the 302 redirection)
          James Dumay made changes -
          Resolution Original: Cannot Reproduce [ 5 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

            jamesdumay James Dumay
            pprkut Heinz Wiesinger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: