diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ZipStream.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ZipStream.php b/src/ZipStream.php index a9aa014..ea25a87 100644 --- a/src/ZipStream.php +++ b/src/ZipStream.php @@ -425,7 +425,12 @@ final class Entry { throw new Errors\PathError($path, "path contains double slashes"); } - # check for double dots + # check for backslashes + if (preg_match('/\\/', $path)) { + throw new Errors\PathError($path, "path contains backslashes"); + } + + # check for relative path if (preg_match('/\.\./', $path)) { throw new Errors\PathError($path, "relative path"); } |