Commit Graph

376 Commits

Author SHA1 Message Date
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
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
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
Steph Fox
ce586bf826 - MF53 dotted.path support 2008-05-13 18:43:18 +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
Greg Beaver
82dc03941a fix weird alias issues, add tests to check for new-found problems 2008-05-12 20:42:07 +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
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
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
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
5ba8ca70a4 fix alias overloading handling for archives that are not in use 2008-05-06 21:14:53 +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
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
fbb2e8ce60 more fixes for PHAR_G(cwd) 2008-04-28 06:03:33 +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
Steph Fox
21584ed029 - kill a couple of (release build) MS compiler warnings 2008-04-24 16:59:23 +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
3d890f09a8 fix extension detection for executable=2 2008-04-23 18:22:09 +00:00
Greg Beaver
c034683550 new test for Phar::isValidPharFilename. Fix Phar::isValidPharFilename. Fix extension detection for all cases 2008-04-23 18:11:20 +00:00
Greg Beaver
5a4a54f64b remove unused code 2008-04-21 16:51:26 +00:00
Greg Beaver
aaf6101928 another refactoring to combine an error and improve code coverage as a side effect 2008-04-21 16:50:18 +00:00
Greg Beaver
32f2eeea47 minor re-factoring reduces code lines for an error (and evilly increases code coverage at gcov ;) 2008-04-21 16:46:01 +00:00
Greg Beaver
69f74c5c80 minor re-factoring reduces code lines for an error (and evilly increases code coverage at gcov ;) 2008-04-21 16:42:53 +00:00
Greg Beaver
3d858f4aa9 implement symbolic link support within a tar-based phar archive
this also resulted in a major fix for mounted directories, which were recycling the 'link' field which
could cause stupid conflicts with actual links, so move that to new 'tmp' field.
2008-04-21 06:17:51 +00:00
Greg Beaver
027180d6ee new test for bad checksum, fix tar.c to catch tar archives with a corrupted first entry, fix memleak on bad checksum 2008-04-20 17:28:54 +00:00
Greg Beaver
ab45c16a61 fix all but 1 test on windows (yay) 2008-04-20 04:19:13 +00:00
Greg Beaver
54540385b8 fix a couple more tests on windows 2008-04-20 04:10:51 +00:00
Greg Beaver
95fc6451f0 fix 98 of 105 failing tests on windows (real progress now) 2008-04-20 00:24:01 +00:00
Greg Beaver
9035dc059a fix 3 failing tests out of 108 on windows (whoop-de-doo) 2008-04-19 17:57:24 +00:00
Greg Beaver
ef0139c866 fix ZTS build 2008-04-19 17:24:41 +00:00
Greg Beaver
c4f502fae0 COMPLETELY rework filename extension detection. Now the only requirements are:
1 - executable phars must contain '.phar' in the filename
2 - non-executable phars must not contain '.phar' and must have an extension of at least 1 character

In addition, phar filenames must exist if opened for read, and the directory containing the phar must exist if opened for creation
if opened for creation, the file must not already exist
[DOC]
2008-04-18 04:13:13 +00:00
Greg Beaver
8c4477cde5 fix segfault in meta-data parsing of zip archives 2008-04-16 04:15:08 +00:00
Greg Beaver
dc837b5f53 rename is_zip parameter of phar_parse_metadata to more accurately reflect what it is 2008-04-16 04:01:33 +00:00
Greg Beaver
6387155b3d add another test for alias overloading and make sure we disallow it when passed in constructor 2008-04-16 03:42:29 +00:00
Greg Beaver
6c0564c721 increase code coverage for phpinfo(), rework CLI phpinfo for phar.extract_list to be legible 2008-04-16 03:26:20 +00:00
Greg Beaver
77b6ed3861 further big-endian systems fixes for zip 2008-04-15 19:16:47 +00:00
Greg Beaver
1a2ac90cde truly enable APC in phar 2008-04-15 13:52:02 +00:00
Greg Beaver
9e33e0cc5b add support for proper APC caching 2008-04-15 04:56:34 +00:00
Greg Beaver
2277396fe3 fix edge case where a new phar is created via mkdir(), add to dir.phpt test 2008-04-14 15:21:41 +00:00
Greg Beaver
b8865a63ae another attempt at fixing mac OS X compile, remove unused obsolete code 2008-04-14 04:47:34 +00:00
Greg Beaver
1c3097fcbe make built-in SplFileInfo->isWriteable() work for PharFileInfo as well, by ensuring phar->is_writeable is set/reset when phar.readonly is changed 2008-04-10 03:12:08 +00:00
Marcus Boerger
5b3560f069 - Ifdef out code that has if(0) and doesn't compile anyway 2008-03-27 12:54:23 +00:00