[TYPO3-core] RFC: Bug 3994: OpenOffice.org files cannot be indexed by class.external_parser.php

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Aug 30 10:38:14 CEST 2006


Michael Stucki schrieb:
> This is a SVN patch request.
> 
> Problem:
> There are some bugs in the [case 'sxw':] - section of the readFileContent() - 
> function:
> 
> $cmd = $this->app['unzip'].' -p '.$absFile.' content.xml';
> 
> This doesn't work with whitespaces in the filename. Same with unzipping 
> meta.xml.
>  
> Solution:
> $out must be unset() before the second exec()-call, otherwise $meta_xml will 
> contain the content of both content.xml and meta.xml

+1 for unsetting $res.

But no to adding double quotes around file names. Double quotes allow shell 
processing of the argument, so it should be single quotes. OTOH the name 
should be escaped anyway, so please use escapeshellarg().

Masi



More information about the TYPO3-team-core mailing list