-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.okay-after-rc1Used by release team to mark a release-blocker issue as okay to resolve either before or after rc1Used by release team to mark a release-blocker issue as okay to resolve either before or after rc1release-blocker
Milestone
Description
The archive/zip
package forbids writing data to directory files: Writing to the io.Writer
returned by w.Create("dir/")
fails with zip: write to directory
.
However, archive/zip
permits reading data from directory files. This means there are zip archives that can be read by archive/zip
, but not rewritten. In addition, the zip specification doesn't permit directories to contain file data, so these archives are invalid:
Zero-byte files, directories, and other file types that contain no content MUST NOT include file data.
We should return an error when parsing a zip file that contains a directory that contains data.
Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for the report.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.okay-after-rc1Used by release team to mark a release-blocker issue as okay to resolve either before or after rc1Used by release team to mark a release-blocker issue as okay to resolve either before or after rc1release-blocker