summaryrefslogtreecommitdiff
path: root/ext/zip/tests
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2016-06-19 17:05:48 +0100
committerJakub Zelenka <bukka@php.net>2016-06-19 17:05:48 +0100
commite63a8540a60e95aa5bd8e269add1b02afcc1b79b (patch)
treeb83a144eec24cc81adab0b9a778f7a730d8df79e /ext/zip/tests
parent7a4cc73641bb3eb878f7184bcbd026ee663cf2a9 (diff)
parent53071e647049f099f7f7a0771ddb63fc2cdd621c (diff)
downloadphp-git-e63a8540a60e95aa5bd8e269add1b02afcc1b79b.tar.gz
Merge branch 'openssl_error_store' into openssl_aead
Diffstat (limited to 'ext/zip/tests')
-rw-r--r--ext/zip/tests/bug72258.phpt26
-rw-r--r--ext/zip/tests/bug72258.zipbin0 -> 110 bytes
2 files changed, 26 insertions, 0 deletions
diff --git a/ext/zip/tests/bug72258.phpt b/ext/zip/tests/bug72258.phpt
new file mode 100644
index 0000000000..87ba618450
--- /dev/null
+++ b/ext/zip/tests/bug72258.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #72258 ZipArchive converts filenames to unrecoverable form
+--SKIPIF--
+<?php
+/* $Id$ */
+if(!extension_loaded('zip')) die('skip');
+?>
+--FILE--
+<?php
+
+$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug72258.zip";
+
+$zip = new \ZipArchive();
+$res = $zip->open($fn);
+if ($res !== true) {
+ echo 'Error opening: ' . $res;
+ die();
+}
+
+for ($i = 0; $i < $zip->numFiles; $i++) {
+ $fnInArc = $zip->getNameIndex($i, ZipArchive::FL_ENC_RAW);
+ var_dump($fnInArc);
+}
+?>
+--EXPECT--
+string(6) "/"
diff --git a/ext/zip/tests/bug72258.zip b/ext/zip/tests/bug72258.zip
new file mode 100644
index 0000000000..07ea2e4948
--- /dev/null
+++ b/ext/zip/tests/bug72258.zip
Binary files differ