Bug #25470

$GLOBALS['TYPO3_CONF_VARS']['BE']['unzip_path'] setting used with and without unzip command

Added by Patrick Rodacker about 8 years ago. Updated 9 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-03-30
Due date:
% Done:

100%

TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The configuration option

$GLOBALS['TYPO3_CONF_VARS']['BE']['unzip_path']

is used in two different functions within the core:

The start() function in the class t3lib_extFileFunctions sets the var $this->unzipPath

$this->unzipPath = $GLOBALS['TYPO3_CONF_VARS']['BE']['unzip_path'];

which is used in the function
func_unzip() expecting the configuration to be the path only without the command including a trailing slash:

$cmd = $this->unzipPath . 'unzip -qq "' . $theFile . '" -d "' . $theDest . '"';

The other occurence of the configuration setting is within the extension em. The static function unzip in the class tx_em_Tools expects the setting to include the unzip command:

$cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['unzip_path'] . ' -o ' . escapeshellarg($file);

Associated revisions

Revision 55b96353 (diff)
Added by Rastislav Birka about 8 years ago

[BUGFIX] unzip_path setting is used inconsistently

The setting $TYPO3_CONF_VARS']['BE']['unzip_path'] is used inconsistently in TYPO3.

In some cases, it expects the directory of the unzip binary. In other places, the
full path of the unzip binary is expected. This change adds a compatibilty layer
to cope with this.

Thanks to Tobias Liebig (networkteam GmbH) for sponsoring 60 beers during the
bug auction at T3BOARD11.

Change-Id: I67ef7b3544c2c2085f959229ff4343cbb736fde6
Resolves: #25470
Reviewed-on: http://review.typo3.org/1370
Reviewed-by: Michael Stucki
Tested-by: Michael Stucki

Revision 2ec9428f (diff)
Added by Rastislav Birka about 8 years ago

[BUGFIX] unzip_path setting is used inconsistently

The setting $TYPO3_CONF_VARS']['BE']['unzip_path'] is used inconsistently in TYPO3.

In some cases, it expects the directory of the unzip binary. In other places, the
full path of the unzip binary is expected. This change adds a compatibilty layer
to cope with this.

Thanks to Tobias Liebig (networkteam GmbH) for sponsoring 60 beers during the
bug auction at T3BOARD11.

Change-Id: Iae834f7577450ab7173c9827db508bd464ba1fa3
Resolves: #25470
Reviewed-on: http://review.typo3.org/1374
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny

History

#1 Updated by Michael Stucki about 8 years ago

Consider that this fix should be backwards-compatible. If someone used to set the program name in unzip_path, then his setup should remain running!

#2 Updated by Patrick Rodacker about 8 years ago

Maybe the solution should be implementend like the path for the setting:

$GLOBALS['TYPO3_CONF_VARS']['BE']['diff_path']

which includes the command itself?

#3 Updated by Mr. Hudson about 8 years ago

Patch set 1 of change I67ef7b3544c2c2085f959229ff4343cbb736fde6 has been pushed to the review server.
It is available at http://review.typo3.org/1370

#4 Updated by Mr. Hudson about 8 years ago

Patch set 2 of change I67ef7b3544c2c2085f959229ff4343cbb736fde6 has been pushed to the review server.
It is available at http://review.typo3.org/1370

#5 Updated by Mr. Hudson about 8 years ago

Patch set 1 of change Iae834f7577450ab7173c9827db508bd464ba1fa3 has been pushed to the review server.
It is available at http://review.typo3.org/1374

#6 Updated by Mr. Hudson about 8 years ago

Patch set 3 of change I67ef7b3544c2c2085f959229ff4343cbb736fde6 has been pushed to the review server.
It is available at http://review.typo3.org/1370

#7 Updated by Mr. Hudson about 8 years ago

Patch set 1 of change Ia34f8ae2ac89ed7c62fbb3165b4fda5388179273 has been pushed to the review server.
It is available at http://review.typo3.org/1383

#8 Updated by Mr. Hudson about 8 years ago

Patch set 2 of change Iae834f7577450ab7173c9827db508bd464ba1fa3 has been pushed to the review server.
It is available at http://review.typo3.org/1374

#9 Updated by Rastislav Birka about 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#10 Updated by Chris topher almost 3 years ago

  • Status changed from Resolved to Under Review
  • Is Regression set to No

#11 Updated by Chris topher almost 3 years ago

  • Is Regression changed from No to Yes

#12 Updated by Chris topher almost 3 years ago

  • Is Regression changed from Yes to No

#13 Updated by Chris topher almost 3 years ago

  • Status changed from Under Review to Resolved

#14 Updated by Benni Mack 9 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF