[TYPO3-core] RFC: Bug 3994: OpenOffice.org files cannot be indexed by class.external_parser.php
Michael Stucki
michael at typo3.org
Fri Sep 1 01:11:39 CEST 2006
Hi Masi,
committed to both TYPO3_4-0 and Trunk.
About the quotes:
Basically I agree with you, but in this situation there's always and only
indexed_search who calls the exec() command. So in this case, there is no
danger of a possible misuse, and that's why I keep this for now...
- michael
Martin Kutschker wrote:
> 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
--
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
More information about the TYPO3-team-core
mailing list