Bug #25699

indexing of external files may be prevented by php's open_basedir restriction (Bug 18520 in core)

Added by Christian Hernmarck about 2 years ago. Updated about 1 month ago.

Status:New Start date:2011-04-01
Priority:Must have Due date:
Assignee:- % Done:

0%

Category:indexed search
Target version:-
TYPO3 Version: Complexity:
PHP Version:
Votes: 1 (View)

Description

See
http://forge.typo3.org/issues/18520

***
class.external_parser.php tries to check the existence with is_file(). This fails in my case because of an existing open-basedir-restriction in php.

The attached patch fixes this problem by disabling the check if an open_basedir restriction is in effect (which is already done this way if you have safe_mode on)
(issue imported from #M7969)

Related issues

related to Core - Bug #44381: indexed_search FE Plugin doesn't show external urls in TY... New 2013-01-08

History

Updated by Christian Hernmarck almost 2 years ago

What's going on with this issue?

what can I do to push this? In the core, bug 18520 has all patches for 4.3,4.4 and 4.5

I saw that in the new master branch someone (I'm new to git - could not see details..) worked on this file but instead of adding the open_basedir check (s)he kicked out the safemode check:

4.5 branch:

switch($extension) {
case 'pdf':
// PDF
if ($indexerConfig['pdftools']) {
$pdfPath = rtrim($indexerConfig['pdftools'], '/').'/';
if ($safeModeEnabled || (@is_file($pdfPath . 'pdftotext' . $exe) && @is_file($pdfPath . 'pdfinfo' . $exe))) {
$this->app['pdfinfo'] = $pdfPath.'pdfinfo'.$exe;
$this->app['pdftotext'] = $pdfPath.'pdftotext'.$exe;
// PDF mode:
$this->pdf_mode = t3lib_div::intInRange($indexerConfig['pdf_mode'],-100,100);
$extOK = TRUE;
} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:pdfToolsNotFound'), $pdfPath), 3);
} else $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:pdfToolsDisabled'), 1);
break;

new master branch:

switch($extension) {
case 'pdf':
// PDF
if ($indexerConfig['pdftools']) {
$pdfPath = rtrim($indexerConfig['pdftools'], '/').'/';
if (@is_file($pdfPath . 'pdftotext' . $exe) && @is_file($pdfPath . 'pdfinfo' . $exe)) {
$this->app['pdfinfo'] = $pdfPath.'pdfinfo'.$exe;
$this->app['pdftotext'] = $pdfPath.'pdftotext'.$exe;
// PDF mode:
$this->pdf_mode = t3lib_div::intInRange($indexerConfig['pdf_mode'],-100,100);
$extOK = TRUE;
} else $this->pObj->log_setTSlogMessage(sprintf($this->sL('LLL:EXT:indexed_search/locallang.xml:pdfToolsNotFound'), $pdfPath), 3);
} else $this->pObj->log_setTSlogMessage($this->sL('LLL:EXT:indexed_search/locallang.xml:pdfToolsDisabled'), 1);
break;

I'll do some tests but I think is_file won't return true if either safemode is enabled (ok this will be no more a problem with PHP6...) or open_basedir is set (and does not include the path to the file...)

is_file needs php access to the file (open_basedir) - exec does not....

/Ch

Updated by Oliver Hader about 1 month ago

  • Target version set to (temporary)

Updated by Oliver Hader about 1 month ago

  • Project changed from Indexed Search to Core

Updated by Oliver Hader about 1 month ago

  • Category set to indexed search

Updated by Oliver Hader about 1 month ago

  • Target version deleted ((temporary))

Also available in: Atom PDF