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

Spaces don't work in resource root paths

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:
    • Released As:
      jenkins.2.201

      Description

      We have an archived folder called HeadlessChrome 77.0.3865 (Linux 0.0.0) with a file index.html the contents of that folder fail when served via resource root.
      If I make a copy of the folder HeadlessChrome-77.0.3865-(Linux-0.0.0), that index.html file will be served successfully.

      Pipeline for testing:

      node('master') {
         sh '''mkdir -p "a/foo bar has lots of spaces to make people unhappy"
         touch "a/foo bar has lots of spaces to make people unhappy/index.html"
         '''
         archiveArtifacts 'a/'
      }
      

        Attachments

          Issue Links

            Activity

            jsoref Josh Soref created issue -
            jsoref Josh Soref made changes -
            Field Original Value New Value
            Link This issue relates to JENKINS-41891 [ JENKINS-41891 ]
            jsoref Josh Soref made changes -
            Summary Parentheses don't work in resource root paths Spaces don't work in resource root paths
            danielbeck Daniel Beck made changes -
            Assignee Daniel Beck [ danielbeck ]
            danielbeck Daniel Beck made changes -
            Issue Type Improvement [ 4 ] Bug [ 1 ]
            danielbeck Daniel Beck made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jsoref Josh Soref made changes -
            Description We have an archived folder called {{HeadlessChrome 77.0.3865 (Linux 0.0.0)}} with a file {{index.html}} the contents of that folder fail when served via resource root.
             If I make a copy of the folder {{HeadlessChrome-77.0.3865-(Linux-0.0.0)}}, that {{index.html}} file will be served successfully.
            We have an archived folder called {{HeadlessChrome 77.0.3865 (Linux 0.0.0)}} with a file {{index.html}} the contents of that folder fail when served via resource root.
             If I make a copy of the folder {{HeadlessChrome-77.0.3865-(Linux-0.0.0)}}, that {{index.html}} file will be served successfully.

            Pipeline for testing:
            {code}
            node('master') {
               sh '''mkdir "foo bar"
               touch "foo bar/index.html"
               '''
               archiveArtifacts 'foo bar/'
            }
            {code}
            jsoref Josh Soref made changes -
            Description We have an archived folder called {{HeadlessChrome 77.0.3865 (Linux 0.0.0)}} with a file {{index.html}} the contents of that folder fail when served via resource root.
             If I make a copy of the folder {{HeadlessChrome-77.0.3865-(Linux-0.0.0)}}, that {{index.html}} file will be served successfully.

            Pipeline for testing:
            {code}
            node('master') {
               sh '''mkdir "foo bar"
               touch "foo bar/index.html"
               '''
               archiveArtifacts 'foo bar/'
            }
            {code}
            We have an archived folder called {{HeadlessChrome 77.0.3865 (Linux 0.0.0)}} with a file {{index.html}} the contents of that folder fail when served via resource root.
             If I make a copy of the folder {{HeadlessChrome-77.0.3865-(Linux-0.0.0)}}, that {{index.html}} file will be served successfully.

            Pipeline for testing:
            {code:java}
            node('master') {
               sh '''mkdir -p "foo bar"
               touch "foo bar/index.html"
               '''
               archiveArtifacts 'foo bar/'
            }
            {code}
            jsoref Josh Soref made changes -
            Description We have an archived folder called {{HeadlessChrome 77.0.3865 (Linux 0.0.0)}} with a file {{index.html}} the contents of that folder fail when served via resource root.
             If I make a copy of the folder {{HeadlessChrome-77.0.3865-(Linux-0.0.0)}}, that {{index.html}} file will be served successfully.

            Pipeline for testing:
            {code:java}
            node('master') {
               sh '''mkdir -p "foo bar"
               touch "foo bar/index.html"
               '''
               archiveArtifacts 'foo bar/'
            }
            {code}
            We have an archived folder called {{HeadlessChrome 77.0.3865 (Linux 0.0.0)}} with a file {{index.html}} the contents of that folder fail when served via resource root.
             If I make a copy of the folder {{HeadlessChrome-77.0.3865-(Linux-0.0.0)}}, that {{index.html}} file will be served successfully.

            Pipeline for testing:
            {code:java}
            node('master') {
               sh '''mkdir -p "a/foo bar has lots of spaces to make people unhappy"
               touch "a/foo bar has lots of spaces to make people unhappy/index.html"
               '''
               archiveArtifacts 'a/'
            }
            {code}
            Show
            jsoref Josh Soref added a comment - Daniel Beck found the problem: https://github.com/jenkinsci/jenkins/blob/11c1146d0dc30e948ade8d1636ae01345c294291/core/src/main/java/jenkins/security/ResourceDomainRootAction.java#L166-L176
            danielbeck Daniel Beck made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jsoref Josh Soref made changes -
            Remote Link This issue links to "PR#4302 (Web Link)" [ 23841 ]
            Hide
            danielbeck Daniel Beck added a comment -

            Will be released tomorrow or Monday.

            Show
            danielbeck Daniel Beck added a comment - Will be released tomorrow or Monday.
            danielbeck Daniel Beck made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Released As jenkins.2.201
            Hide
            jsoref Josh Soref added a comment -

            Picked up the change, verified it works. Thanks  

            Show
            jsoref Josh Soref added a comment - Picked up the change, verified it works. Thanks  
            jsoref Josh Soref made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                danielbeck Daniel Beck
                Reporter:
                jsoref Josh Soref
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: