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

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

XMLWordPrintable

    • 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

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

              Created:
              Updated:
              Resolved: