Documentation
¶
Overview ¶
Package zipx provides safe ZIP validation and extraction with limits against zip-slip, oversized archives, and special files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Policy ¶
type Policy struct {
MaxFiles int // maximum number of files allowed
MaxTotalBytes int64 // maximum total uncompressed bytes
MaxFileBytes int64 // maximum size per file
AllowSymlinks bool // whether symlinks are allowed
PreserveTimes bool // whether to preserve file mtimes
}
Policy defines extraction limits and behavior.
func DefaultPolicy ¶
func DefaultPolicy() Policy
DefaultPolicy returns conservative defaults: 20k files, 2 GiB total, 512 MiB per file, no symlinks, no times.
Click to show internal directories.
Click to hide internal directories.