Project

General

Profile

Actions

Task #39928

closed

Central function to correctly (locale-aware) escape filenames and shell-args

Added by Stefan Neufeind over 12 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2012-08-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

The functionality below appears in 3 places in core currently (and one more currently under review).
We should add a central function for that (t3lib_div? hmm ...)

Appears in:
t3lib/class.t3lib_stdgraphic.php
t3lib/thumbs.php
t3lib/file/Service/FileProcessingService.php

And patch for review at: https://review.typo3.org/9177 (feature for 6.0 possibly, feature #34227)

Taken from: t3lib/class.t3lib_stdgraphic.php
protected function wrapFileName($inputName) {
if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['UTF8filesystem']) {
$currentLocale = setlocale(LC_CTYPE, 0);
setlocale(LC_CTYPE, $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLocale']);
}
$escapedInputName = escapeshellarg($inputName);
if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['UTF8filesystem']) {
setlocale(LC_CTYPE, $currentLocale);
}
return $escapedInputName;
}


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #34227: Scheduler: Allow execution using "at"-daemonClosedStefan Neufeind2012-02-24

Actions
Related to TYPO3 Core - Bug #55721: wrong filenames when UTF8filesystem is set and 'systemLocale' is emptyClosed2014-02-06

Actions
Actions #1

Updated by Michael Stucki over 12 years ago

  • Status changed from New to Accepted
  • Complexity set to easy
Actions #2

Updated by Mathias Schreiber almost 10 years ago

  • Target version set to 7.1 (Cleanup)
Actions #3

Updated by Gerrit Code Review almost 10 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35959

Actions #4

Updated by Gerrit Code Review almost 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35959

Actions #5

Updated by Gerrit Code Review almost 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35959

Actions #6

Updated by Gerrit Code Review almost 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35959

Actions #7

Updated by Gerrit Code Review almost 10 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35959

Actions #8

Updated by Stefan Neufeind almost 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF