Ilija Tovilo
8fc023cbae
[skip ci] Fix tmp file clash in ext/zip/tests/oo_cancel.phpt
2023-05-01 15:28:59 +02:00
Remi Collet
c76374d26f
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
NEWS
Fix GH-8781 ZipArchive::close deletes zip file without updating stat cache
2022-06-15 15:39:00 +02:00
Remi Collet
390538af2e
Fix GH-8781 ZipArchive::close deletes zip file without updating stat cache
2022-06-15 15:37:27 +02:00
Christoph M. Becker
7f0a1e2f2d
Fix bug40228*.phpt conflict
...
Both tests use the same directory structure; we avoid that by
extracting to separate subdirectories.
Closes GH-7831.
2021-12-26 23:23:56 +01:00
Christoph M. Becker
9faa11d346
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix #77978 : Dirname ending in colon unzips to wrong dir
2021-10-04 12:58:38 +02:00
Christoph M. Becker
57a32c6a69
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #77978 : Dirname ending in colon unzips to wrong dir
2021-10-04 12:57:01 +02:00
Christoph M. Becker
e0c0de003b
Fix #77978 : Dirname ending in colon unzips to wrong dir
...
When making the relative path, we must not stop on a `:\` sequence in
the middle of the filename. This is only significant on Windows as it
may indicate an absolute filename, but this is already checked at the
beginning of the function.
Note that the bug and this patch affects all systems. However, on
Windows the file is no longer extracted at all, since Windows NTSF does
not allow filenames containing colons.
Closes GH-7528.
2021-10-04 12:55:34 +02:00
Christoph M. Becker
80860baeb1
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix #81490 : ZipArchive::extractTo() may leak memory
2021-09-30 15:45:16 +02:00
Christoph M. Becker
5db6e35843
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #81490 : ZipArchive::extractTo() may leak memory
2021-09-30 15:42:40 +02:00
Christoph M. Becker
4d44271415
Fix #81490 : ZipArchive::extractTo() may leak memory
...
We always need to free the CWD state.
Closes GH-7536.
2021-09-30 15:41:05 +02:00
Dmitry Stogov
443b196033
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT x86: Fixed register clobbering in code produced for "$x[$y] %= $z".
Fix #81420 : ZipArchive::extractTo extracts outside of destination
2021-09-21 10:48:59 +03:00
Stanislav Malyshev
cebff25d27
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #81420 : ZipArchive::extractTo extracts outside of destination
2021-09-20 21:35:43 -07:00
Stanislav Malyshev
f92bae23ce
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #81420 : ZipArchive::extractTo extracts outside of destination
2021-09-20 21:34:57 -07:00
Christoph M. Becker
df2ceac25a
Fix #81420 : ZipArchive::extractTo extracts outside of destination
...
We need to properly detect and handle absolute paths in a portable way.
2021-09-20 21:29:24 -07:00
Remi Collet
d515979b34
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
NEWS + bump zip version
Fix #80833 ZipArchive::getStream doesn't use setPassword
2021-09-01 15:51:37 +02:00
Remi Collet
a6ffd8d1e9
Fix #80833 ZipArchive::getStream doesn't use setPassword
2021-09-01 15:49:46 +02:00
Nikita Popov
96f9501b3a
Fix directory clash in zip test
2021-08-13 15:48:47 +02:00
Meletis Flevarakis
5664ae8a9e
Verify exception on ZipArchive::getExternalAttributesName when $name is empty ( #7230 )
...
Co-authored-by: Meletios Flevarakis <m.flevarakis@gmail.com>
2021-07-12 20:42:36 +02:00
Nikita Popov
7485978339
Migrate SKIPIF -> EXTENSIONS ( #7138 )
...
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00
Remi Collet
3f6a9c9b7b
Remove duplicated test
...
(was previously splitted for <5.3 and >5.3)
2021-06-07 12:11:13 +02:00
Christoph M. Becker
cc86f70de9
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix #80863 : ZipArchive::extractTo() ignores references
2021-05-07 19:22:51 +02:00
Christoph M. Becker
ab3052ab26
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #80863 : ZipArchive::extractTo() ignores references
2021-05-07 19:21:58 +02:00
Christoph M. Becker
57918b1a1b
Fix #80863 : ZipArchive::extractTo() ignores references
...
We need to cater to references, when traversing the files to extract.
While we're at it, we move the `zval_file` declaration into a narrower
scope.
Closes GH-6959.
2021-05-07 19:15:29 +02:00
Máté Kocsis
b567a9d173
Use typed properties in ext/zip
...
Closes GH-6881
2021-04-26 13:21:17 +02:00
Dmitry Stogov
72c3ededed
Change the order of properties used for var_dump(), serialize(), comparison, etc.
...
Now properties are ordered according to their layout in zend_object structure.
2021-03-01 13:29:49 +03:00
Christoph M. Becker
d65a520b1d
Raise E_WARNING on PHP related errors
...
If Zip operations fails due to PHP error conditions before libzip even
has been called, there is no meaningful indication what failed; the
functions just return false, and the Zip status indicated that no error
did occur. Therefore we raise `E_WARNING` in these cases.
Closes GH-6356.
2020-11-06 11:00:43 +01:00
Christoph M. Becker
f4b0b32e2d
Raise E_WARNING on PHP related errors
...
If Zip operations fails due to PHP error conditions before libzip even
has been called, there is no meaningful indication what failed; the
functions just return false, and the Zip status indicated that no error
did occur. Therefore we raise `E_WARNING` in these cases.
Closes GH-6356.
2020-10-26 11:40:06 +01:00
Nikita Popov
c5401854fc
Run tidy
...
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00
George Peter Banyard
72383ccabb
Promote warnings in ext/zip
2020-08-17 15:52:20 +02:00
Máté Kocsis
7aacc705d0
Add many missing closing PHP tags to tests
...
Closes GH-5958
2020-08-09 22:03:36 +02:00
Nikita Popov
0dda242bde
Add GLOB_BRACE skipif
2020-08-06 10:26:32 +02:00
Fabien Villepinte
0c6d06ecfa
Replace EXPECTF when possible
...
Closes GH-5779
2020-06-29 21:31:44 +02:00
Ayesh Karunaratne
d114812faf
[ci skip] Various typo fixes in stub comments and CHANGES file
2020-06-25 23:32:40 +02:00
Máté Kocsis
f3b1f342c8
Deprecate the procedural API of ext/zip
...
Closes GH-5746
2020-06-23 17:39:29 +02:00
Remi Collet
b1fddec717
relax test (TS issue)
2020-05-18 07:53:03 +02:00
Rod Elias
682e2f6c20
Trim trailing whitespaces and fix code style
...
Closes GH-5554.
2020-05-12 17:00:11 +02:00
Remi Collet
2dc8d39bae
- add ZipArchive::EM_UNKNOWN constant - add ZipArchive::EM_TRAD_PKWARE constant - cleanup hack for libzip 1.3.1 (have only exist for a few days) - add ZipArchive::isCompressionMethodSupported() method (libzip 1.7.0) - add ZipArchive::isEncryptionMethodSupported() method (libzip 1.7.0) - bump version to 1.19.0-dev
2020-04-02 14:52:05 +02:00
Remi Collet
57042ac23e
add missing test
2020-03-20 12:13:25 +01:00
Remi Collet
db62ad18f3
fix test, thanks Indrek
2020-03-20 12:13:25 +01:00
Remi Collet
a4d12f46d1
ZipArchive::open(): Using empty file as ZipArchive is deprecated
2020-03-20 11:27:42 +01:00
Remi Collet
217ff8132e
Merge branch 'PHP-7.4'
...
* PHP-7.4:
unneeded after fix
NEWS
NEWS
Fix Bug #79296 ZipArchive::open fails on empty file
2020-03-20 11:19:04 +01:00
Remi Collet
347d18b48e
unneeded after fix
2020-03-20 11:18:52 +01:00
Remi Collet
3b22e10535
Fix bug #77960 add compr. /encr. options for ZipArchive::addGlob and ZipArchive::addPattern
...
options parameter now accepts:
- comp_method
- comp_flags
- enc_method
- enc_password
2020-03-18 14:05:09 +01:00
Remi Collet
be14d4e135
better fix for #72374
2020-03-06 10:27:29 +01:00
Remi Collet
6f53605275
- make status, statusSys properties and
...
ZipArchive::getStatusString() method available after archive is closed
2020-03-05 10:57:26 +01:00
Remi Collet
0b21a89472
add lastId property to ZipArchive
2020-03-04 15:31:06 +01:00
Remi Collet
fb8e221907
- add ZipArchive::FL_RECOMPRESS, FL_ENCRYPTED, FL_OVERWRITE, FL_LOCAL, FL_CENTRAL constants
...
- add optional "flags" parameter to ZipArchive::addEmptyDir, addFile and addFromString methods
- add "flags" options to ZipArchive::addGlob and addPattern methods
keeping previous behavior having FL_OVERWRITE by default
- add ZipArchive::replaceFile() method
2020-03-02 16:48:53 +01:00
Remi Collet
06750d75e9
Merge branch 'PHP-7.4'
...
* PHP-7.4:
fix test
2020-02-28 10:39:43 +01:00
Remi Collet
5b82fd491a
fix test
2020-02-28 10:39:08 +01:00
Remi Collet
7f0d3f1eab
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #79315 ZipArchive::addFile doesn't honor start/length parameters
2020-02-28 10:35:39 +01:00