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

Use Path.startsWith() to cover a corner case when unzipping

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • core
    • 2.304 and 2.303.1

      The current check (JENKINS-56931) using String.startsWith() fails to detect a corner case when zip entries have the same path prefix with the target location because the value returned by File.getCanonicalPath() doesn't end with a slash.
      eg: /foobar is a subdirectory of /foo

          [JENKINS-66094] Use Path.startsWith() to cover a corner case when unzipping

          Trung created issue -
          Daniel Beck made changes -
          Labels New: lts-candidate
          Daniel Beck made changes -
          Released As New: 2.304
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]
          Daniel Beck made changes -
          Status Original: Fixed but Unreleased [ 10203 ] New: Resolved [ 5 ]
          Basil Crow made changes -
          Labels Original: lts-candidate New: 2.303-fixed lts-candidate
          Mark Waite made changes -
          Labels Original: 2.303-fixed lts-candidate New: 2.303-fixed
          Mark Waite made changes -
          Released As Original: 2.304 New: 2.304 and 2.303.1
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            trungpa Trung
            trungpa Trung
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: