Greg Beaver
6db7baba99
MFB: fix corrupted zips, fix postprocess for compressed zip file
2008-05-30 22:49:46 +00:00
Greg Beaver
ca6d36efb8
MFB: refactor function names for clarity. No functionality change
2008-05-30 22:39:33 +00:00
Greg Beaver
195ee5ca73
MFB: fix PECL bug #13981 : Third-party zips fail entry interrogation
2008-05-29 17:34:58 +00:00
Stanislav Malyshev
f6af23d30e
MF5: Fix code path in phar_open_compiled_file() that tries
...
to open not-yet-loaded phar and fails on compressed files
# By Gregory's request
# Sorry, can't find how to write test case for that - it reproduces
# for me only under bytecode-caching. Suggestions welcome.
2008-05-28 21:50:41 +00:00
Felipe Pena
06a7527c65
- Removed UEXPECT(F)
2008-05-27 13:16:27 +00:00
Steph Fox
76a9ec377b
- MFB major fixes
...
* found felipe's segfault in util.c and fixed the segfault (3 tests fail due to odd behavior of . and .. on this machine)
* fixed serious flaws in the setting/resetting of is_data - now it works properly. Assume
all new PharData are tar-based, and allow passing Phar::ZIP to PharData constructor to override this
* fix broken earlier commit, introduced segfault that broke 20 tests here
2008-05-24 14:18:31 +00:00
Steph Fox
bdca5a12b0
- MFB fix offset detection in tar files
2008-05-24 13:59:56 +00:00
Greg Beaver
8589859191
MFB fix convertTo\*() for same-named archives with no files
2008-05-21 20:39:33 +00:00
Greg Beaver
a08acfb080
s/zend_hash_exists/zend_hash_find/
2008-05-20 05:01:08 +00:00
Greg Beaver
ccf430ca93
MFB relax rename requirements
2008-05-20 04:09:41 +00:00
Steph Fox
2c20c55716
- unicodify expected output
2008-05-19 19:37:39 +00:00
Steph Fox
f08aea109b
- IS_UNICODE checks and conversions
...
- stub and creation file updates
- far too many test updates to think about
2008-05-19 19:05:42 +00:00
Greg Beaver
eb99aa475e
MFH fix mem leak, add test for previous segfault fix
2008-05-18 23:41:17 +00:00
Greg Beaver
3d953abaf3
MFB fix segfault
2008-05-18 23:12:47 +00:00
Felipe Pena
87d80cf81a
- Added UEXPECTF
2008-05-18 00:47:22 +00:00
Greg Beaver
11fb7561f0
enable by default statically instead of shared
...
this is done by removing zlib/bz2 explicit dependencies because they are unnecessary
we only ever use the stream filter, and the check for existence has
been moved to runtime where it is after startup
2008-05-17 20:07:38 +00:00
Greg Beaver
1e4b633721
MFB fix test (again)
2008-05-17 20:04:18 +00:00
Greg Beaver
25b8e6cc3f
MFB: add full metadata support for tar-based archives and test
2008-05-15 23:46:54 +00:00
Greg Beaver
144e472967
MFB: plug security hole of unfettered creation access to .phar magic directory
2008-05-15 16:09:21 +00:00
Steph Fox
c1ae13b985
- Make internal code back-compatible. This included a binary cast in the default stub, hence many test updates.
...
- Just over a third of tests pass. Test manifests are broken currently.
2008-05-14 21:27:31 +00:00
Felipe Pena
ede5c8dd09
- Fixed tests (added default_charset=)
2008-05-13 19:18:11 +00:00
Steph Fox
ce586bf826
- MF53 dotted.path support
2008-05-13 18:43:18 +00:00
Greg Beaver
cfa135cb17
MFB fix tests
2008-05-13 18:38:35 +00:00
Steph Fox
247d91e780
- 'It builds on my box'.
...
- Don't expect any tests to pass.
2008-05-13 18:35:25 +00:00
Felipe Pena
461006fa97
- Added SKIPIF
2008-05-13 14:49:36 +00:00
Greg Beaver
2734ed6c4f
back to dev
2008-05-12 21:03:48 +00:00
Greg Beaver
5974e9ccff
prepare for release
2008-05-12 20:43:04 +00:00
Greg Beaver
82dc03941a
fix weird alias issues, add tests to check for new-found problems
2008-05-12 20:42:07 +00:00
Steph Fox
ac8ea81588
- Update package/TODO as best memory allows
2008-05-12 19:11:24 +00:00
Greg Beaver
30eca098e4
fix minor memleak
2008-05-12 17:40:14 +00:00
Steph Fox
dba1c11685
- Make sure default alias is set in phar.zip
...
- Add test
2008-05-12 17:12:56 +00:00
Steph Fox
7416b0cd91
- Fix tests
2008-05-12 12:46:41 +00:00
Greg Beaver
ae789a055e
increase code coverage
2008-05-12 00:45:05 +00:00
Greg Beaver
51a1d6a3b7
increase code coverage in util.c
2008-05-12 00:43:11 +00:00
Greg Beaver
e6558c56a3
increase code coverage to test mounting of phar URLs to internal file, and fix odd semi-race condition
...
where stream resources were not properly freed at script end
2008-05-12 00:16:59 +00:00
Greg Beaver
b3bab5022a
increase code coverage
2008-05-11 23:07:12 +00:00
Greg Beaver
24efbb759b
simplify phar_get_link_location and increase its coverage to 100%
2008-05-11 23:03:56 +00:00
Greg Beaver
70d0a4c045
increase code coverage and fix tiny bug in handling of absolute links
2008-05-11 22:59:16 +00:00
Greg Beaver
ad1be25d8c
don't copy contents of linked/mounted files when converting an archive, and be sure to dupe mounted value
2008-05-11 22:45:03 +00:00
Greg Beaver
92f0dc842f
fix test
2008-05-11 22:44:33 +00:00
Greg Beaver
4ccf0b846e
slightly increase efficiency of function interception, and ensure that nothing fails even if the archive is unlinked mid-process
2008-05-11 21:30:05 +00:00
Greg Beaver
7149523766
add safety check to prevent unlinkArchive() from being called by a file within the archive
2008-05-11 21:15:47 +00:00
Greg Beaver
5d168ad544
fix memleak
2008-05-11 20:53:38 +00:00
Greg Beaver
376deb39d6
split test into two versions for differences in parameter parsing in PHP 5.3+
2008-05-11 19:41:45 +00:00
Greg Beaver
a0969ed78f
make test version-agnostic
2008-05-11 19:37:43 +00:00
Greg Beaver
38d5943ee6
increase code coverage of funcinterceptors to 90%+, fix many bugs, fix errant wrong test condition in fgc_edgecases
2008-05-11 19:17:51 +00:00
Greg Beaver
25a6be6cde
fix windows build
2008-05-08 03:10:18 +00:00
Greg Beaver
53e02373d0
fix handling of mounted entries when flushing in all phars, and of deleted entries with open references in tar-based phars, do not extract mounted entries, add to test
2008-05-08 02:58:45 +00:00
Greg Beaver
a919e2f858
fix serious logic error and potential security issue with phar_compiled_file and
...
phar_find_in_include_path. We were allowing data-based phars to be executed, and actually marking phar-based phar archives
without '.phar' in the name as data-based phars, which would allow modifying them even if phar.readonly=0. Add test for this sinister case
2008-05-08 00:49:37 +00:00
Greg Beaver
0773c7f6a2
fix tar extension detection in open code
2008-05-07 17:35:20 +00:00
Greg Beaver
f134a909c3
optimize phar filename extension detection to first search through known phars. This eliminates several stat/realpath calls for archives with lots of files
2008-05-07 17:24:22 +00:00
Greg Beaver
0f5f61c071
prepare for 2.0.0b1 release, pending review (finally)
2008-05-07 06:43:07 +00:00
Greg Beaver
e765e8f6ca
remove files created
2008-05-07 06:39:05 +00:00
Greg Beaver
eda25ddb34
validate user-supplied aliases when converting archives to other formats
2008-05-07 06:36:24 +00:00
Greg Beaver
549bf83bd1
[DOC]
...
remove phar.extract_list
remove Phar::getExtractList()
2008-05-07 05:38:31 +00:00
Greg Beaver
f8db86b008
remove APC fanciness - this was causing non-caching of some files include()d inside a phar archive
2008-05-07 05:13:41 +00:00
Greg Beaver
96d4c2b62f
fix zip metadata for archive/fix perms for file in zip/all.phpt test
2008-05-06 21:46:26 +00:00
Greg Beaver
04735b675d
new failing test for testing all zip creation facets
2008-05-06 21:34:19 +00:00
Greg Beaver
196f0ef42b
fix segfault in buildfromdirectory2 test and potential segfault
2008-05-06 21:23:48 +00:00
Greg Beaver
5ba8ca70a4
fix alias overloading handling for archives that are not in use
2008-05-06 21:14:53 +00:00
Greg Beaver
3d388e71d2
new test for unset behavior
2008-05-06 18:25:33 +00:00
Steph Fox
21460875fc
- Some tests for buildFromDirectory()
2008-05-04 20:58:43 +00:00
Steph Fox
c322c1a94a
- Kill Windows warning when int meets short
...
- All tests still pass
2008-05-03 21:09:56 +00:00
Greg Beaver
a180fcc9bc
add Phar::unlinkArchive() to allow complete removal of a parsed phar archive from memory and disk
2008-05-03 02:04:24 +00:00
Greg Beaver
bfbe53eeb2
refactor isTar/isZip/isPhar into isFileFormat(int format) where format is one of Phar::TAR,, Phar::ZIP, Phar::PHAR
...
[DOC]
2008-05-02 05:05:56 +00:00
Greg Beaver
e0bc2b2be1
update TODO, re-order methods to be alphabetical, tweak extractTo to set permissions and handle NULL for files
...
# this also matches the docs I just committed :)
2008-05-02 04:44:39 +00:00
Greg Beaver
93fd16ef4d
fix possible read past end of buffer by ridiculously stupid convoluted logic (I wrote it, I can call it that) reported by valgrind
2008-04-30 23:49:09 +00:00
Greg Beaver
0a3fc4faba
fix unix-only valgrind issue by initializing arch
2008-04-30 23:44:30 +00:00
Greg Beaver
2b8a56779b
fix cwd test in php 5.2, now all tests pass in 5.2 on unix
2008-04-30 23:06:57 +00:00
Greg Beaver
c3816a2aa0
fix test to be truly path-agnostic
2008-04-30 23:06:04 +00:00
Greg Beaver
d16f86f528
fix Bug #13786 on unix (Steph can you verify?)
2008-04-30 22:16:25 +00:00
Greg Beaver
791bb5db46
fix test (passes in PHP_5_3 on my 64-bit machine, have not yet tested in 5_2)
2008-04-30 22:12:21 +00:00
Greg Beaver
4b1409fef7
add helper file I use for debugging the front controller tests
2008-04-30 22:10:56 +00:00
Greg Beaver
73830f751f
add missing file for test
2008-04-30 22:09:18 +00:00
Greg Beaver
5f4c42d301
fix double free
2008-04-30 20:17:27 +00:00
Greg Beaver
aeefda4a50
stupid cut/paste error
2008-04-30 20:14:54 +00:00
Greg Beaver
9d27fab9c4
increase code coverage to test cwd stuffs
2008-04-30 20:14:15 +00:00
Greg Beaver
483018e170
remove unneeded exception handling (webPhar is always within an outer zend_execute block which handles exceptions for us, this is unnecessary)
2008-04-30 02:20:48 +00:00
Steph Fox
8a970147ad
- Allow setStub() to continue working
...
- Fix tests broken by earlier commit
2008-04-29 12:26:58 +00:00
Steph Fox
8559a2dbde
- Prevent phars with empty manifests flushing to disk
...
- This would've fixed that test... removing clean section
@Greg: I commented out the call that breaks the Windows build, pending a decision about its future.
2008-04-29 12:06:54 +00:00
Steph Fox
7d3e9ef952
- Fix paths in test
2008-04-29 11:37:33 +00:00
Steph Fox
7762c5d204
- Add test for bug #13786
2008-04-29 10:45:23 +00:00
Greg Beaver
984ea1f437
fix segfault (now all tests pass here)
2008-04-28 23:00:46 +00:00
Greg Beaver
a78fd15fae
fix double free and broken stat.phpt
2008-04-28 22:57:21 +00:00
Greg Beaver
ee1273af7a
remove hack introduced because of broken usage of php_resolve_path instead of zend_resolve_path
2008-04-28 22:41:20 +00:00
Greg Beaver
18f221c61d
it's a bit cheesy, but make this test 5.2/5.3 agnostic :)
2008-04-28 22:32:15 +00:00
Greg Beaver
7220c19556
fix tar generation - we were subtly corrupting the header with \0 because of use of strcpy
2008-04-28 16:44:53 +00:00
Greg Beaver
ff90f59ea9
fix off-by-one for writing of timestamp and file modes in tar files
2008-04-28 06:49:56 +00:00
Greg Beaver
fbb2e8ce60
more fixes for PHAR_G(cwd)
2008-04-28 06:03:33 +00:00
Greg Beaver
62f824b6e1
fix crash (this area really needs code coverage)
2008-04-28 04:38:07 +00:00
Greg Beaver
5da6c48f7d
add open_basedir/safe_mode checks for files in Phar::addFile()
2008-04-27 23:59:41 +00:00
Greg Beaver
e2660a692b
fix test
2008-04-27 23:59:14 +00:00
Steph Fox
bcd2ddd018
- Kill another one from the gcov site's parameter parsing report
2008-04-27 16:42:03 +00:00
Steph Fox
51459aade4
- Another test that gives completely different results if readonly=0
2008-04-27 12:22:36 +00:00
Steph Fox
473abd4e2b
- Deleting files we cannot see...
2008-04-27 11:36:22 +00:00
Steph Fox
37a8782f0c
- Fix a couple of failing tests/bad cleanup
...
@Greg: the phpinfo() ones assumed no php.ini - this isn't always the case, even if it should be
2008-04-27 11:31:27 +00:00
Steph Fox
2ea698eae7
- Make it possible to extract all *and* overwrite
2008-04-27 11:26:15 +00:00
Steph Fox
9e8c3ea9a7
- Always give reasons for skipped tests
2008-04-27 10:18:35 +00:00
Steph Fox
77dcb8cffd
- Kill a few uninitialized vars (thanks gcov)
2008-04-27 10:14:00 +00:00
Greg Beaver
fd9bf92ac6
fix out-of-bounds read potential by replacing strstr with a custom strnstr
2008-04-27 07:20:02 +00:00
Greg Beaver
5bf3d1d362
fix invalid free
2008-04-27 07:04:56 +00:00
Greg Beaver
94846549f5
fix APC compile hook interception, now APC actually caches files
2008-04-26 23:16:49 +00:00
Greg Beaver
fade22bfd8
fix ridiculously critical omission in zip flush - we never set compressed file size! Augment zip test for bz2/zlib-compressed alias files to increase code coverage
2008-04-26 23:02:51 +00:00
Greg Beaver
11c93b8494
add checking for invalid alias on opening tar, and test
2008-04-26 22:31:44 +00:00
Greg Beaver
ad6e7fc667
add screening of alias to reading of zip archives, and test for bad aliases
2008-04-26 22:04:04 +00:00
Greg Beaver
5b85b2074b
new test/updated test to ensure stub integrity (I was wrong, zip is fine)
2008-04-26 17:47:31 +00:00
Greg Beaver
489fe0331f
add logic test to ensure stub is not overwritten when adding a file (zip currently does this - bad zip)
2008-04-26 17:43:53 +00:00
Greg Beaver
52f5a0f2ac
increase code coverage
2008-04-26 17:34:14 +00:00
Greg Beaver
15f9f20c3c
really fix test by fixing the regex
2008-04-26 17:32:18 +00:00
Greg Beaver
76c78a480e
increase code coverage (and magically, mysteriously this tests passes with no other changes - weird)
2008-04-26 17:29:55 +00:00
Greg Beaver
eb6b941d2a
fix clean
2008-04-26 17:28:28 +00:00
Greg Beaver
f37605ec0c
increase code coverage
2008-04-26 17:27:47 +00:00
Greg Beaver
b22cc67e6b
new test increases code coverage
2008-04-26 17:20:50 +00:00
Greg Beaver
2227f10f3e
add failing portion of test for compressed alias read
2008-04-26 17:18:15 +00:00
Greg Beaver
8e7f6d6662
add failing portion of test for bz2 compressed file on open
2008-04-26 17:14:27 +00:00
Greg Beaver
79a45a9666
fix buildfromiterator base to exclude directory separator on unix or windows, fix 10 test to have new tests
2008-04-26 17:09:58 +00:00
Greg Beaver
c6b617eca8
fix cleanup
2008-04-26 16:57:14 +00:00
Steph Fox
cf7f50e42c
- Added a RecursiveIterator/buildFromIterator test
...
- Fixed up bug13727.phpt to take < 15 minutes :\\ and clean up after itself
- Cleaned up protos/reflection data
- Added myself to package.xml credits
2008-04-26 13:22:38 +00:00
Greg Beaver
0c2f3b760a
add Phar::extractTo(dest_directory[, mixed files[, bool overwrite]])
...
this is very similar to ext/zip's extractTo and is based on that code, with the addition of the third parameter, which
is used to allow overwriting existing files (disallowed by default, unlike ext/zip's implementation)
[DOC]
2008-04-26 05:31:00 +00:00
Greg Beaver
c5fc383cb7
finish code coverage work (whew)
2008-04-26 05:28:56 +00:00
Steph Fox
dbb4618bd5
- cs
2008-04-26 02:04:09 +00:00
Steph Fox
f040cb6492
- fixed those pesky memleaks
2008-04-26 01:52:22 +00:00
Steph Fox
9bf8d7429e
- implemented Phar::buildFromDirectory
...
@Greg: There are two (identical) recurring memleaks I can't seem to kill, both marked FIXME. Would you please take a look?
[DOC] $phar->buildFromDirectory(dirname[, regex]). Return value is an array pairing each file in the archive index with the original path on the filesystem.
2008-04-25 21:37:41 +00:00
Greg Beaver
68dc76a9ab
make dang sure this ridiculous test cleans up after itself
2008-04-25 16:54:37 +00:00
Greg Beaver
8657ab7e5a
add test for bug #13727 , fix bug #13727
2008-04-25 16:50:22 +00:00
Greg Beaver
2bf5042d74
finish code coverage testing of phar_object.c (except for iterator building, which Steph is doing) and fix segfault in error message for directory getcontent if it is a temp directory
2008-04-25 16:10:59 +00:00
Greg Beaver
84004bf248
new test with code coverage for PharFileInfo::setMetadata/delMetadata, improve error messages
2008-04-25 16:05:05 +00:00
Greg Beaver
3864211c00
remove unneeded skipif conditions
2008-04-25 15:56:20 +00:00
Greg Beaver
13dc477de2
new code coverage test, improve clarity of error message when chmod is used on a temp directory
2008-04-25 15:53:02 +00:00
Greg Beaver
7c7b387cc3
fix potentially serious security issue: buffer overrun if the tar filename > 101 characters in length. This fixes tests/tar/bignames.phpt
2008-04-25 04:35:10 +00:00
Greg Beaver
efe519c194
fix access fault on windows, fix memleak on all platforms when accessing a temp directory via offsetGet
2008-04-25 04:34:03 +00:00
Greg Beaver
6036559d35
fix tests on windows
2008-04-25 04:31:44 +00:00
Greg Beaver
fc9aba79f5
add missing file (Steph: this fixes tests/tar/truncated.phpt, sorry :)
2008-04-25 04:29:08 +00:00
Greg Beaver
218b975485
fix test (except for memleaks)
2008-04-24 20:02:04 +00:00
Greg Beaver
0db641af3e
rework PharFileInfo->decompress and add failing test
2008-04-24 19:57:22 +00:00
Greg Beaver
d28dcfaf60
new test
2008-04-24 17:25:23 +00:00
Greg Beaver
84c622c2ab
new test for PharFileInfo::__destruct
2008-04-24 17:19:01 +00:00
Steph Fox
aaf5498ff4
- clean the right file :)
2008-04-24 17:02:27 +00:00
Steph Fox
21584ed029
- kill a couple of (release build) MS compiler warnings
2008-04-24 16:59:23 +00:00
Steph Fox
28459132cb
- Fix Windows build
2008-04-24 16:03:40 +00:00
Greg Beaver
91e67a4fbd
test PharFileInfo::__construct, fix potential segfault, and bad logic in phar detection
2008-04-24 05:18:50 +00:00
Greg Beaver
1f98c6526b
increase code coverage
2008-04-24 05:03:12 +00:00
Greg Beaver
24d83fa7f8
fix break when uncompressed files are re-saved, fixes phar_copy.phpt test
2008-04-24 04:56:22 +00:00
Greg Beaver
8f0c9caac5
remove redundant unreachable code in Phar::copy, augment test, and add failing condition that needs to be fixed
2008-04-24 04:14:05 +00:00
Greg Beaver
696dafa370
new test for Phar::decompress()
2008-04-24 04:05:20 +00:00
Greg Beaver
b721660ec7
increase code coverage
2008-04-23 19:01:52 +00:00
Greg Beaver
9c60d2dcaf
increase code coverage
2008-04-23 19:00:42 +00:00
Greg Beaver
207a093186
increase code coverage
2008-04-23 18:59:41 +00:00
Greg Beaver
3190bd0884
increase code coverage, fix minor memleak
2008-04-23 18:54:09 +00:00
Greg Beaver
cebd8a5864
increase code coverage
2008-04-23 18:46:48 +00:00