Skip to content

Invalid Characters in Zip throws exception #341

@RevenantBob

Description

@RevenantBob

Steps to reproduce

  1. Use a Zip file produced on a *nix system or MacOS (In this case)
  2. Zip files with invalid windows characters that are valid on MacOS/Linux
  3. Open up Zip archive with SharpZipLib API

Exception is thrown.

Expected behavior

SharpZipLib should not load a ZipFile class and try to clean up the entry filenames before returning them to the user. The user should be responsible for cleaning up entries themselves in whatever method they see fit.

Actual behavior

SharpZipLib throws an exception in ZipEntry line 1303 because IsPathRooted checks for invalid characters. It also removes root path names.

Version of SharpZipLib

1.10

Obtained from (only keep the relevant lines)

  • Package installed using NuGet

For now I worked around the issues by removing the CleanName function from ZipEntry in my own local copy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzipRelated to ZIP file format

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions