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

Forward slashes in a File Parameter's file location cause parameter download links to break

    Details

    • Similar Issues:

      Description

      When a 'File Parameter' is given a 'File Location' with forward slashes to use a subdirectory of the workspace (ex: subfolder/input.txt), the file cannot be downloaded from the build's Parameters page. A blank page appears when the links are clicked. If there are no slashes in the 'File Location' the file will download fine.

      To Reproduce:
      -------------
      Create New Build
      Check 'This Build is Parameterized'
      Add 'File Parameter' with 'file location' = "subfolder/input.txt"
      Save
      Run Build using a text file named 'testfile.txt' as parameter.
      On that Build's info page
      Click Parameters
      Try and download using the link

      Result:
      -------
      URL like:
      http://JenkinsBox/job/fileParameterBuild/1/parameters/parameter/subdir%2Finput.txt/testfile.txt
      Leading to blank white Page

      Expected Result:
      ----------------
      Specified File Downloads

      Additional Notes:
      -----------------
      The file DOES exist on the server:
      C:\BUILD\.jenkins\jobs\fileParameterBuild\builds\2014-01-10_16-52-47\fileParameters\subdir\input.txt

        Attachments

          Issue Links

            Activity

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The File Parameter is located in Jenkins core

            Show
            oleg_nenashev Oleg Nenashev added a comment - The File Parameter is located in Jenkins core
            Hide
            danielbeck Daniel Beck added a comment -

            Do you access Jenkins through a reverse proxy?

            Show
            danielbeck Daniel Beck added a comment - Do you access Jenkins through a reverse proxy?
            Hide
            bobtheshrew Eric Anker added a comment -

            I don't believe so. it's a single server and the issue is present on localhost. How else can I help diagnose?

            Show
            bobtheshrew Eric Anker added a comment - I don't believe so. it's a single server and the issue is present on localhost. How else can I help diagnose?
            Hide
            danielbeck Daniel Beck added a comment -

            I confirm the issue on Jenkins 1.561 on CentOS 6 behind Apache reverse proxy.

            Show
            danielbeck Daniel Beck added a comment - I confirm the issue on Jenkins 1.561 on CentOS 6 behind Apache reverse proxy.
            Hide
            danielbeck Daniel Beck added a comment -

            ... however not on a localhost. And I know my Apache reverse proxy is broken.

            Eric: What version of Jenkins are you using? Is there a note complaining about your reverse proxy setup on the "Manage Jenkins" page?

            Show
            danielbeck Daniel Beck added a comment - ... however not on a localhost. And I know my Apache reverse proxy is broken. Eric: What version of Jenkins are you using? Is there a note complaining about your reverse proxy setup on the "Manage Jenkins" page?
            Hide
            bobtheshrew Eric Anker added a comment -

            Jenkins ver. 1.514 / apache-tomcat-7.0.39
            No complaint on the Manage Jenkins Page
            What else can I look for?

            Show
            bobtheshrew Eric Anker added a comment - Jenkins ver. 1.514 / apache-tomcat-7.0.39 No complaint on the Manage Jenkins Page What else can I look for?
            Hide
            danielbeck Daniel Beck added a comment -

            Eric Anker:

            Improved reverse proxy brokenness detection was added in 1.552. If you have a way to set up a second context with a new versions to see whether it complains would be interesting to learn.

            That being said, is the following relevant to your setup? http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding

            Try to set

            JkOptions +ForwardURICompatUnparsed

            Please report back if you get this fixed, as that'd help us improve the docs.

            Show
            danielbeck Daniel Beck added a comment - Eric Anker : Improved reverse proxy brokenness detection was added in 1.552. If you have a way to set up a second context with a new versions to see whether it complains would be interesting to learn. That being said, is the following relevant to your setup? http://tomcat.apache.org/connectors-doc/reference/apache.html#Forwarding Try to set JkOptions +ForwardURICompatUnparsed Please report back if you get this fixed, as that'd help us improve the docs.
            Hide
            bobtheshrew Eric Anker added a comment -

            I'm using pure Tomcat (No Apache web server) so, I don't that Jk setting applies...
            I tried upgrading to Jenkins ver. 1.554.2 and updating all the plugins on my test system - The Manage Jenkins Page has no warnings about reverse-proxy and the issue is still present.
            Thank you for your continued support, Daniel.
            Where should I look next?

            Show
            bobtheshrew Eric Anker added a comment - I'm using pure Tomcat (No Apache web server) so, I don't that Jk setting applies... I tried upgrading to Jenkins ver. 1.554.2 and updating all the plugins on my test system - The Manage Jenkins Page has no warnings about reverse-proxy and the issue is still present. Thank you for your continued support, Daniel. Where should I look next?
            Hide
            danielbeck Daniel Beck added a comment -

            I'm mostly out of ideas

            Assuming you have a Windows box around you could run Jenkins with integrated Jetty on (java -jar jenkins.war): Does the issue occur there as well (i.e. Windows/Jetty combination)?

            Show
            danielbeck Daniel Beck added a comment - I'm mostly out of ideas Assuming you have a Windows box around you could run Jenkins with integrated Jetty on ( java -jar jenkins.war ): Does the issue occur there as well (i.e. Windows/Jetty combination)?
            Hide
            danielbeck Daniel Beck added a comment -

            Erik: Did you have a chance to test on a Jetty-based instance yet?

            Show
            danielbeck Daniel Beck added a comment - Erik: Did you have a chance to test on a Jetty-based instance yet?
            Hide
            danielbeck Daniel Beck added a comment -

            Eric Anker: Ping!

            Show
            danielbeck Daniel Beck added a comment - Eric Anker : Ping!
            Hide
            bobtheshrew Eric Anker added a comment -

            Sorry for the delay. Thanks for following up.

            That scenario appears to work!
            So there's something not right with my fairly stock tomcat instance then?

            Show
            bobtheshrew Eric Anker added a comment - Sorry for the delay. Thanks for following up. That scenario appears to work! So there's something not right with my fairly stock tomcat instance then?
            Hide
            danielbeck Daniel Beck added a comment -
            Show
            danielbeck Daniel Beck added a comment - Eric: Does org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH help? http://permalink.gmane.org/gmane.comp.jakarta.tomcat.user/157941 Further reference: http://tomcat.apache.org/security-5.html#Fixed_in_Apache_Tomcat_5.5.22,_5.0.SVN
            Hide
            bobtheshrew Eric Anker added a comment -

            Those settings fixed it.
            Thank you so much for your attention to this issue!

            Show
            bobtheshrew Eric Anker added a comment - Those settings fixed it. Thank you so much for your attention to this issue!
            Hide
            danielbeck Daniel Beck added a comment -

            Not a Jenkins issue.

            Added to documentation in the wiki.

            Show
            danielbeck Daniel Beck added a comment - Not a Jenkins issue. Added to documentation in the wiki.

              People

              • Assignee:
                Unassigned
                Reporter:
                bobtheshrew Eric Anker
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: