svn: / pear/peardoc/trunk/en/pyrus/extending/registry.xml pecl/phar/trunk/package.php pecl/phar/trunk/php_phar.h pecl/phar/trunk/tar.c pecl/phar/trunk/tests/tar/bug49910.phpt pecl/phar/trunk/tests/tar/files/Structures_Graph-1.0.3.tgz php/php-src/branches/PHP_5_3/NEWS php/php-src/branches/PHP_5_3/ext/phar/php_phar.h php/php-src/branches/PHP_5_3/ext/phar/tar.c php/php-src/branches/PHP_5_3/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz php/php-src/trunk/ext/phar/php_phar.h php/php-src/trunk/ext/phar/tar.c php/php-src/trunk/ext/phar/tests/tar/bug49910.phpt php/php-src/trunk/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz

[email protected] (Greg Beaver)
Newsgroups php.cvs,php.pear.doc,php.pecl.cvs
Message-ID <[email protected]>
cellog                                   Wed, 11 Nov 2009 21:02:59 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=290527

Log:
fix PHP Bug #49910: no support for ././@LongLink for long filenames in phar tar support

Bug: http://bugs.php.net/49910 (Open) no support for ././@LongLink for long filenames in phar tar support
      
Changed paths:
    U   pear/peardoc/trunk/en/pyrus/extending/registry.xml
    U   pecl/phar/trunk/package.php
    U   pecl/phar/trunk/php_phar.h
    U   pecl/phar/trunk/tar.c
    A   pecl/phar/trunk/tests/tar/bug49910.phpt
    A   pecl/phar/trunk/tests/tar/files/Structures_Graph-1.0.3.tgz
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/phar/php_phar.h
    U   php/php-src/branches/PHP_5_3/ext/phar/tar.c
    A   php/php-src/branches/PHP_5_3/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz
    U   php/php-src/trunk/ext/phar/php_phar.h
    U   php/php-src/trunk/ext/phar/tar.c
    A   php/php-src/trunk/ext/phar/tests/tar/bug49910.phpt
    A   php/php-src/trunk/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz
svn-diffs-290527.txt (text/x-diff, 22.3 KB)
Modified: pear/peardoc/trunk/en/pyrus/extending/registry.xml
===================================================================
--- pear/peardoc/trunk/en/pyrus/extending/registry.xml	2009-11-11 21:00:19 UTC (rev 290526)
+++ pear/peardoc/trunk/en/pyrus/extending/registry.xml	2009-11-11 21:02:59 UTC (rev 290527)
@@ -389,7 +389,7 @@
  <section xml:id="pyrus.extending.registry.channelregistry">
   <info><title>Channel registry</title></info>
   <para>
-   This document is a work in progress.
+
   </para>
  </section>
 </section>

Modified: pecl/phar/trunk/package.php
===================================================================
--- pecl/phar/trunk/package.php	2009-11-11 21:00:19 UTC (rev 290526)
+++ pecl/phar/trunk/package.php	2009-11-11 21:02:59 UTC (rev 290527)
@@ -1,77 +1,9 @@
 <?php

 $notes = '
-BC BREAKING RELEASE
- BC breaks:
- * Phar object Compression API is rewritten.  Use Phar::compress() and decompress(),
-   Phar::compressFiles()/decompressFiles() and PharFileInfo->compress()/decompress().
- * phar.extract_list and Phar::getExtractList() are removed
-
-Major feature functionality release
- * phar.cache_list allows web-based phar applications to run at equal or faster than
-   their on-disk equivalent [Greg]
- * new default stub allows running of phar-based phars without phar extension [Greg/Steph]
- * add support for tar-based and zip-based phar archives [Greg]
- * add support for OpenSSL-based true signatures [Greg]
- * add support for signatures to tar-based phar archives [Greg]
- * add Phar::isFileFormat() [Greg]
- * add Phar::convertToExecutable(), Phar::convertToData() [Greg]
- * add Phar::compress() [Greg]
- * rename Phar::compressAllFiles() to compressFiles(), uncompressAllFiles() to
-   decompressFiles() [Greg]
- * conversion to compressed or to other file formats automatically copies the archive
-   to a new extension (i.e. ".phar" to ".phar.tar" or ".tar" to ".tar.gz") [Steph]
- * add Phar::webPhar() for running a web-based application unmodified
-   directly from a phar archive [Greg]
- * file functions (fopen-based and stat-based) can be instructed to only look for
-   relative paths within a phar via Phar::interceptFileFuncs()
- * add PharData class to allow manipulation/creation of non-executable tar and zip archives. [Steph]
-   non-executable tar/zip manipulation is allowed even when phar.readonly=1 [Greg]
- * paths with . and .. work (phar://blah.phar/a/../b.php => phar://blah.phar/b.php) [Greg]
- * add support for mkdir()/rmdir() and support for empty directories to phar file format [Greg]
- * add option to compress the entire phar file for phar/tar file format [Greg]
- * implement Phar::isCompressed() returning 0, Phar::GZ or Phar::BZ2 [Greg]
- * implement Phar::copy(string $from, string $to) [Greg]
- * implement Phar::running(), returns path or URL to currently executed phar
- * implement Phar::buildFromIterator(Iterator $it[, string $base_directory]) [Greg]
- * implement Phar::buildFromDirectory(string $base_directory[, string $regex]) [Steph]
- * implement Phar::mount() for mounting external paths or files to locations inside a phar [Greg]
- * add Phar::delete() [Greg]
- * implement Phar::unlinkArchive() [Greg]
-
-Security addition
- * aliases are validated so that they contain no directory separators as intended
- * on conversion to other formats, user-supplied aliases are validated
-
-Changes since 2.0.0RC2:
- fixed PHP Bug #49021: phar tar signature algorithm reports as Unknown (0) in
- getSignature() call
- fixed PHP Bug #49020: phar misinterprets ustar long filename standard
- fixed PHP Bug #49018: phar tar stores long filenames with prefix/name reversed
- fixed PHP Bug #48791: open office files always reported as corrupted
- fixed PHP Bug #48783: make install will fail saying phar file exists
- fixed PHP Bug #48740: PHAR install fails when INSTALL_ROOT is not the final install location
- fixed PHP Bug #48681: openssl signature verification for tar archives broken
- fixed PHP Bug #48377: error message unclear on converting phar with existing file
- fixed isset() on sub-directories (isset("blah") if file "blah/foo.php" exists)
-
- make phar work in PHP 6
-Changes since 2.0.0RC1:
- security vulnerability in handling of long tar filenames fixed
- fixed PECL Bug #14646: phar error message unclear with php stream wrappers
- fixed PECL Bug #16338: php_stream_copy_to_stream{,_ex}()
- fixed PHP Bug #48257: PharData throws an exception with non-phar tar
- fixed PHP Bug #47085: rename() returns true even if the file in PHAR does not exist
- fixed PHP Bug #46032: PharData::__construct() - wrong memory read
- fixed PHP Bug #46060: Phar::addEmptyDir() breaks
- fixed PHP Bug #45907: undefined reference to \'PHP_SHA512Init\'
- fixed PHP Bug #45726: PHP_Archive / Archive.php missing
-Changes since 2.0.0a2: many bugfixes, removal of phar.extract_list, compression API refactored,
- conversion API refactored
-Changes since 2.0.0b1: addition of phar.cache_list, many performance improvements and bugfixes
- implement OpenSSL asynchronous true package signing
- add support for package signing to tar-based archives
- require PHP 5.2.1+
+Bugfix release
+ * Fix PHP Bug #49910: no support for ././@LongLink for long filenames in
+   phar tar support
 ';

 if (!class_exists("Phar") && !extension_loaded("Phar")) {

Modified: pecl/phar/trunk/php_phar.h
===================================================================
--- pecl/phar/trunk/php_phar.h	2009-11-11 21:00:19 UTC (rev 290526)
+++ pecl/phar/trunk/php_phar.h	2009-11-11 21:02:59 UTC (rev 290527)
@@ -22,7 +22,7 @@
 #ifndef PHP_PHAR_H
 #define PHP_PHAR_H

-#define PHP_PHAR_VERSION "2.0.0"
+#define PHP_PHAR_VERSION "2.0.1"

 #include "ext/standard/basic_functions.h"
 extern zend_module_entry phar_module_entry;

Modified: pecl/phar/trunk/tar.c
===================================================================
--- pecl/phar/trunk/tar.c	2009-11-11 21:00:19 UTC (rev 290526)
+++ pecl/phar/trunk/tar.c	2009-11-11 21:02:59 UTC (rev 290527)
@@ -200,6 +200,7 @@
 	tar_header *hdr;
 	php_uint32 sum1, sum2, size, old;
 	phar_archive_data *myphar, **actual;
+	int last_was_longlink = 0;

 	if (error) {
 		*error = NULL;
@@ -332,7 +333,52 @@
 			goto bail;
 		}

-		if (!old && hdr->prefix[0] != 0) {
+		if (!last_was_longlink && hdr->typeflag == 'L') {
+			last_was_longlink = 1;
+			/* support the ././@LongLink system for storing long filenames */
+			entry.filename_len = entry.uncompressed_filesize;
+			entry.filename = pemalloc(entry.filename_len+1, myphar->is_persistent);
+
+			read = php_stream_read(fp, entry.filename, entry.filename_len);
+			if (read != entry.filename_len) {
+				efree(entry.filename);
+				if (error) {
+					spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
+				}
+				php_stream_close(fp);
+				phar_destroy_phar_data(myphar TSRMLS_CC);
+				return FAILURE;
+			}
+			entry.filename[entry.filename_len] = '\0';
+
+			/* skip blank stuff */
+			size = ((size+511)&~511) - size;
+
+			/* this is not good enough - seek succeeds even on truncated tars */
+			php_stream_seek(fp, size, SEEK_CUR);
+			if ((uint)php_stream_tell(fp) > totalsize) {
+				efree(entry.filename);
+				if (error) {
+					spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
+				}
+				php_stream_close(fp);
+				phar_destroy_phar_data(myphar TSRMLS_CC);
+				return FAILURE;
+			}
+
+			read = php_stream_read(fp, buf, sizeof(buf));
+
+			if (read != sizeof(buf)) {
+				efree(entry.filename);
+				if (error) {
+					spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
+				}
+				php_stream_close(fp);
+				phar_destroy_phar_data(myphar TSRMLS_CC);
+				return FAILURE;
+			}
+			continue;
+		} else if (!last_was_longlink && !old && hdr->prefix[0] != 0) {
 			char name[256];
 			int i, j;

@@ -357,7 +403,7 @@
 				entry.filename_len--;
 			}
 			entry.filename = pestrndup(name, entry.filename_len, myphar->is_persistent);
-		} else {
+		} else if (!last_was_longlink) {
 			int i;

 			/* calculate strlen, which can be no longer than 100 */
@@ -375,6 +421,7 @@
 				entry.filename_len--;
 			}
 		}
+		last_was_longlink = 0;

 		phar_add_virtual_dirs(myphar, entry.filename, entry.filename_len TSRMLS_CC);


Added: pecl/phar/trunk/tests/tar/bug49910.phpt
===================================================================
--- pecl/phar/trunk/tests/tar/bug49910.phpt	                        (rev 0)
+++ pecl/phar/trunk/tests/tar/bug49910.phpt	2009-11-11 21:02:59 UTC (rev 290527)
@@ -0,0 +1,49 @@
+--TEST--
+Bug #49910: no support for ././@LongLink for long filenames in phar tar support
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+$fname = str_replace('\\', '/', dirname(__FILE__) . '/files/Structures_Graph-1.0.3.tgz');
+$tar = new PharData($fname);
+$files = array();
+foreach (new RecursiveIteratorIterator($tar) as $file) {
+	$files[] = str_replace($fname, '*', $file->getPathName());
+}
+print_r($files);
+?>
+===DONE===
+--EXPECT--
+Array
+(
+    [0] => phar://*/Structures_Graph-1.0.3/LICENSE
+    [1] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Manipulator/AcyclicTest.php
+    [2] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Manipulator/TopologicalSorter.php
+    [3] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Node.php
+    [4] => phar://*/Structures_Graph-1.0.3/Structures/Graph.php
+    [5] => phar://*/Structures_Graph-1.0.3/docs/generate.sh
+    [6] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph.html
+    [7] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html
+    [8] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html
+    [9] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Node.html
+    [10] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html
+    [11] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html
+    [12] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Node_php.html
+    [13] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_php.html
+    [14] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html
+    [15] => phar://*/Structures_Graph-1.0.3/docs/html/classtrees_Structures_Graph.html
+    [16] => phar://*/Structures_Graph-1.0.3/docs/html/elementindex.html
+    [17] => phar://*/Structures_Graph-1.0.3/docs/html/elementindex_Structures_Graph.html
+    [18] => phar://*/Structures_Graph-1.0.3/docs/html/errors.html
+    [19] => phar://*/Structures_Graph-1.0.3/docs/html/index.html
+    [20] => phar://*/Structures_Graph-1.0.3/docs/html/li_Structures_Graph.html
+    [21] => phar://*/Structures_Graph-1.0.3/docs/html/media/banner.css
+    [22] => phar://*/Structures_Graph-1.0.3/docs/html/media/stylesheet.css
+    [23] => phar://*/Structures_Graph-1.0.3/docs/html/packages.html
+    [24] => phar://*/Structures_Graph-1.0.3/docs/html/todolist.html
+    [25] => phar://*/Structures_Graph-1.0.3/docs/tutorials/Structures_Graph/Structures_Graph.pkg
+    [26] => phar://*/Structures_Graph-1.0.3/tests/AllTests.php
+    [27] => phar://*/Structures_Graph-1.0.3/tests/testCase/BasicGraph.php
+    [28] => phar://*/package.xml
+)
+===DONE===
\ No newline at end of file

Added: pecl/phar/trunk/tests/tar/files/Structures_Graph-1.0.3.tgz
===================================================================
(Binary files differ)


Property changes on: pecl/phar/trunk/tests/tar/files/Structures_Graph-1.0.3.tgz
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS	2009-11-11 21:00:19 UTC (rev 290526)
+++ php/php-src/branches/PHP_5_3/NEWS	2009-11-11 21:02:59 UTC (rev 290527)
@@ -26,6 +26,8 @@
   (Felipe)
 - Fixed bug #50073 (parse_url() incorrect when ? in fragment). (Ilia)
 - Fixed bug #50023 (pdo_mysql doesn't use PHP_MYSQL_UNIX_SOCK_ADDR). (Ilia)
+- Fixed bug #49910 (no support for ././@LongLink for long filenames in phar
+  tar support). (Greg)
 - Fixed bug #49908 (throwing exception in __autoload crashes when interface
   is not defined). (Felipe)
 - Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private

Modified: php/php-src/branches/PHP_5_3/ext/phar/php_phar.h
===================================================================
--- php/php-src/branches/PHP_5_3/ext/phar/php_phar.h	2009-11-11 21:00:19 UTC (rev 290526)
+++ php/php-src/branches/PHP_5_3/ext/phar/php_phar.h	2009-11-11 21:02:59 UTC (rev 290527)
@@ -22,7 +22,7 @@
 #ifndef PHP_PHAR_H
 #define PHP_PHAR_H

-#define PHP_PHAR_VERSION "2.0.0"
+#define PHP_PHAR_VERSION "2.0.1"

 #include "ext/standard/basic_functions.h"
 extern zend_module_entry phar_module_entry;

Modified: php/php-src/branches/PHP_5_3/ext/phar/tar.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/phar/tar.c	2009-11-11 21:00:19 UTC (rev 290526)
+++ php/php-src/branches/PHP_5_3/ext/phar/tar.c	2009-11-11 21:02:59 UTC (rev 290527)
@@ -200,6 +200,7 @@
 	tar_header *hdr;
 	php_uint32 sum1, sum2, size, old;
 	phar_archive_data *myphar, **actual;
+	int last_was_longlink = 0;

 	if (error) {
 		*error = NULL;
@@ -332,7 +333,52 @@
 			goto bail;
 		}

-		if (!old && hdr->prefix[0] != 0) {
+		if (!last_was_longlink && hdr->typeflag == 'L') {
+			last_was_longlink = 1;
+			/* support the ././@LongLink system for storing long filenames */
+			entry.filename_len = entry.uncompressed_filesize;
+			entry.filename = pemalloc(entry.filename_len+1, myphar->is_persistent);
+
+			read = php_stream_read(fp, entry.filename, entry.filename_len);
+			if (read != entry.filename_len) {
+				efree(entry.filename);
+				if (error) {
+					spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
+				}
+				php_stream_close(fp);
+				phar_destroy_phar_data(myphar TSRMLS_CC);
+				return FAILURE;
+			}
+			entry.filename[entry.filename_len] = '\0';
+
+			/* skip blank stuff */
+			size = ((size+511)&~511) - size;
+
+			/* this is not good enough - seek succeeds even on truncated tars */
+			php_stream_seek(fp, size, SEEK_CUR);
+			if ((uint)php_stream_tell(fp) > totalsize) {
+				efree(entry.filename);
+				if (error) {
+					spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
+				}
+				php_stream_close(fp);
+				phar_destroy_phar_data(myphar TSRMLS_CC);
+				return FAILURE;
+			}
+
+			read = php_stream_read(fp, buf, sizeof(buf));
+
+			if (read != sizeof(buf)) {
+				efree(entry.filename);
+				if (error) {
+					spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
+				}
+				php_stream_close(fp);
+				phar_destroy_phar_data(myphar TSRMLS_CC);
+				return FAILURE;
+			}
+			continue;
+		} else if (!last_was_longlink && !old && hdr->prefix[0] != 0) {
 			char name[256];
 			int i, j;

@@ -357,7 +403,7 @@
 				entry.filename_len--;
 			}
 			entry.filename = pestrndup(name, entry.filename_len, myphar->is_persistent);
-		} else {
+		} else if (!last_was_longlink) {
 			int i;

 			/* calculate strlen, which can be no longer than 100 */
@@ -375,6 +421,7 @@
 				entry.filename_len--;
 			}
 		}
+		last_was_longlink = 0;

 		phar_add_virtual_dirs(myphar, entry.filename, entry.filename_len TSRMLS_CC);


Added: php/php-src/branches/PHP_5_3/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz
===================================================================
(Binary files differ)


Property changes on: php/php-src/branches/PHP_5_3/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: php/php-src/trunk/ext/phar/php_phar.h
===================================================================
--- php/php-src/trunk/ext/phar/php_phar.h	2009-11-11 21:00:19 UTC (rev 290526)
+++ php/php-src/trunk/ext/phar/php_phar.h	2009-11-11 21:02:59 UTC (rev 290527)
@@ -22,7 +22,7 @@
 #ifndef PHP_PHAR_H
 #define PHP_PHAR_H

-#define PHP_PHAR_VERSION "2.0.0"
+#define PHP_PHAR_VERSION "2.0.1"

 #include "ext/standard/basic_functions.h"
 extern zend_module_entry phar_module_entry;

Modified: php/php-src/trunk/ext/phar/tar.c
===================================================================
--- php/php-src/trunk/ext/phar/tar.c	2009-11-11 21:00:19 UTC (rev 290526)
+++ php/php-src/trunk/ext/phar/tar.c	2009-11-11 21:02:59 UTC (rev 290527)
@@ -200,6 +200,7 @@
 	tar_header *hdr;
 	php_uint32 sum1, sum2, size, old;
 	phar_archive_data *myphar, **actual;
+	int last_was_longlink = 0;

 	if (error) {
 		*error = NULL;
@@ -332,7 +333,52 @@
 			goto bail;
 		}

-		if (!old && hdr->prefix[0] != 0) {
+		if (!last_was_longlink && hdr->typeflag == 'L') {
+			last_was_longlink = 1;
+			/* support the ././@LongLink system for storing long filenames */
+			entry.filename_len = entry.uncompressed_filesize;
+			entry.filename = pemalloc(entry.filename_len+1, myphar->is_persistent);
+
+			read = php_stream_read(fp, entry.filename, entry.filename_len);
+			if (read != entry.filename_len) {
+				efree(entry.filename);
+				if (error) {
+					spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
+				}
+				php_stream_close(fp);
+				phar_destroy_phar_data(myphar TSRMLS_CC);
+				return FAILURE;
+			}
+			entry.filename[entry.filename_len] = '\0';
+
+			/* skip blank stuff */
+			size = ((size+511)&~511) - size;
+
+			/* this is not good enough - seek succeeds even on truncated tars */
+			php_stream_seek(fp, size, SEEK_CUR);
+			if ((uint)php_stream_tell(fp) > totalsize) {
+				efree(entry.filename);
+				if (error) {
+					spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
+				}
+				php_stream_close(fp);
+				phar_destroy_phar_data(myphar TSRMLS_CC);
+				return FAILURE;
+			}
+
+			read = php_stream_read(fp, buf, sizeof(buf));
+
+			if (read != sizeof(buf)) {
+				efree(entry.filename);
+				if (error) {
+					spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
+				}
+				php_stream_close(fp);
+				phar_destroy_phar_data(myphar TSRMLS_CC);
+				return FAILURE;
+			}
+			continue;
+		} else if (!last_was_longlink && !old && hdr->prefix[0] != 0) {
 			char name[256];
 			int i, j;

@@ -357,7 +403,7 @@
 				entry.filename_len--;
 			}
 			entry.filename = pestrndup(name, entry.filename_len, myphar->is_persistent);
-		} else {
+		} else if (!last_was_longlink) {
 			int i;

 			/* calculate strlen, which can be no longer than 100 */
@@ -375,6 +421,7 @@
 				entry.filename_len--;
 			}
 		}
+		last_was_longlink = 0;

 		phar_add_virtual_dirs(myphar, entry.filename, entry.filename_len TSRMLS_CC);


Added: php/php-src/trunk/ext/phar/tests/tar/bug49910.phpt
===================================================================
--- php/php-src/trunk/ext/phar/tests/tar/bug49910.phpt	                        (rev 0)
+++ php/php-src/trunk/ext/phar/tests/tar/bug49910.phpt	2009-11-11 21:02:59 UTC (rev 290527)
@@ -0,0 +1,49 @@
+--TEST--
+Bug #49910: no support for ././@LongLink for long filenames in phar tar support
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip"); ?>
+--FILE--
+<?php
+$fname = str_replace('\\', '/', dirname(__FILE__) . '/files/Structures_Graph-1.0.3.tgz');
+$tar = new PharData($fname);
+$files = array();
+foreach (new RecursiveIteratorIterator($tar) as $file) {
+	$files[] = str_replace($fname, '*', $file->getPathName());
+}
+print_r($files);
+?>
+===DONE===
+--EXPECT--
+Array
+(
+    [0] => phar://*/Structures_Graph-1.0.3/LICENSE
+    [1] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Manipulator/AcyclicTest.php
+    [2] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Manipulator/TopologicalSorter.php
+    [3] => phar://*/Structures_Graph-1.0.3/Structures/Graph/Node.php
+    [4] => phar://*/Structures_Graph-1.0.3/Structures/Graph.php
+    [5] => phar://*/Structures_Graph-1.0.3/docs/generate.sh
+    [6] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph.html
+    [7] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html
+    [8] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html
+    [9] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/Structures_Graph_Node.html
+    [10] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html
+    [11] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html
+    [12] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_Node_php.html
+    [13] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/_Structures_Graph_php.html
+    [14] => phar://*/Structures_Graph-1.0.3/docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html
+    [15] => phar://*/Structures_Graph-1.0.3/docs/html/classtrees_Structures_Graph.html
+    [16] => phar://*/Structures_Graph-1.0.3/docs/html/elementindex.html
+    [17] => phar://*/Structures_Graph-1.0.3/docs/html/elementindex_Structures_Graph.html
+    [18] => phar://*/Structures_Graph-1.0.3/docs/html/errors.html
+    [19] => phar://*/Structures_Graph-1.0.3/docs/html/index.html
+    [20] => phar://*/Structures_Graph-1.0.3/docs/html/li_Structures_Graph.html
+    [21] => phar://*/Structures_Graph-1.0.3/docs/html/media/banner.css
+    [22] => phar://*/Structures_Graph-1.0.3/docs/html/media/stylesheet.css
+    [23] => phar://*/Structures_Graph-1.0.3/docs/html/packages.html
+    [24] => phar://*/Structures_Graph-1.0.3/docs/html/todolist.html
+    [25] => phar://*/Structures_Graph-1.0.3/docs/tutorials/Structures_Graph/Structures_Graph.pkg
+    [26] => phar://*/Structures_Graph-1.0.3/tests/AllTests.php
+    [27] => phar://*/Structures_Graph-1.0.3/tests/testCase/BasicGraph.php
+    [28] => phar://*/package.xml
+)
+===DONE===
\ No newline at end of file

Added: php/php-src/trunk/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz
===================================================================
(Binary files differ)


Property changes on: php/php-src/trunk/ext/phar/tests/tar/files/Structures_Graph-1.0.3.tgz
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.