?
Referenced as Pull Request for: # 6554
avatar stAn47
stAn47
20 Feb 2015

Steps to reproduce the issue

Create an installer package which has file names longer than 32 characters, tar it and gzip it into a normal joomla installation package (com_test.tar.gz)

the installer fails to recognize longer files than 32 characters as defined in:

\libraries\joomla\archive\tar.php

and truncates them and they may cause fatal errors if required by php

the long name seems to be stored only within this format:
././@LongLink000 147 0003740 Ladmin/plugins/vmpayment/amazon/library/OffAmazonPaymentsService/OffAmazonPaymentsService.config.inc.phpadmin/plugins/vmpayment/amazon/library/OffAmazonPaymentsService/OffAmazonPaymentsService.config.inc.0000666000000000000000000000113212471644025031355 0ustar

Expected result

full file names

Actual result

truncated filenames

System information (as much as possible)

PHP Version 5.5.21-1+deb.sury.org~precise+2
on ubuntu 12.04

production server

Additional comments

note - maybe joomla should not try to use php own code to unzip/untar these files, but rather check if functions like PharData exists:
http://stackoverflow.com/questions/9416508/php-untar-gz-without-exec

regards, stan

avatar stAn47 stAn47 - open - 20 Feb 2015
avatar stAn47 stAn47 - change - 20 Feb 2015
The description was changed
avatar stAn47 stAn47 - change - 20 Feb 2015
The description was changed
avatar stAn47 stAn47 - change - 20 Feb 2015
The description was changed
avatar zero-24 zero-24 - change - 20 Feb 2015
Category Administration Installation
avatar brianteeman brianteeman - change - 23 Feb 2015
Labels Added: ?
avatar brianteeman brianteeman - change - 25 Feb 2015
Labels Removed: ?
avatar brianteeman brianteeman - change - 25 Feb 2015
Labels Added: ?
avatar vdespa
vdespa - comment - 14 Mar 2015

For replication and testing purposes it would be very nice if you could attach the package which is causing you troubles.

Also please clarify if you are getting any errors.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6133.
avatar vdespa vdespa - change - 14 Mar 2015
Status New Information Required
avatar brianteeman
brianteeman - comment - 16 Mar 2015

the query is about files of longer than 32 characters INSIDE the tar

avatar bertmert
bertmert - comment - 16 Mar 2015

@brianteeman Thanks for info. I've deleted my misleading comment.

avatar OctavianC
OctavianC - comment - 23 Mar 2015

Actually, this issue isn't about filenames containing more than 32 characters. According to Wikipedia, the original TAR format allows file paths (not file names!) up to 100 characters. If you look at the issue reporter's example, you'll notice that admin/plugins/vmpayment/amazon/library/OffAmazonPaymentsService/OffAmazonPaymentsService.config.inc.php is 103 characters, thus exceeding the limit.

I haven't been able to find much info on the web regarding this, but it seems that the GNU implementation of tar uses an 'L' typeflag (76) that puts the filename in the contents block and the original contents of the file in the next block:
http://stackoverflow.com/questions/2078778/what-exactly-is-the-gnu-tar-longlink-trick
http://manpages.ubuntu.com/manpages/intrepid/man5/star.5.html (see LF_LONGNAME)
I've been able to reproduce this by using 7-Zip. Attached you will find the test archive

I proposed a commit - but I referenced the wrong issue - apparently I was looking at the Joomla! tracker on one tab and copied the wrong ID :(
Will update soon.

avatar OctavianC
OctavianC - comment - 23 Mar 2015
avatar OctavianC OctavianC - reference | - 23 Mar 15
avatar stAn47
stAn47 - comment - 23 Mar 2015

hello friends, yes, i might have been wrong here and i apologize for not providing the tar gz which was originatelly within this post, but i was asked to remove it. my first tests seems like it was caused by the 32 char limit.

the 100 char limit seems to be causing it, which is now pointed at
http://issues.joomla.org/tracker/joomla-cms/6554

@brianteeman I would really appreciate if you add a short note to your replies with a link (to joomla docs) on how can a beginner dev start with github joomla checkout of specific fixes.I.e. how to checkout a specific fix via a command line.

thank you y'all, best regards, stan

avatar stAn47 stAn47 - change - 23 Mar 2015
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2015-03-23 16:50:59
avatar stAn47 stAn47 - close - 23 Mar 2015

Add a Comment

Login with GitHub to post a comment