Project

General

Profile

Actions

Bug #50538

closed

Allowed Characters for Filenames

Added by Lucas Bremgartner almost 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2013-07-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If working with Image-Files for Retina-Displays there is the need for filenames with the character @ in it, e.g. image@2x.jpg.

The character @ is prevented by the function cleanFileName in class.t3lib_basicfilefunc.php (respectively BasicFileUtility.php for version >6.0).

But the behavior is inconsistent. If $GLOBALS['TYPO3_CONF_VARS']['SYS']['UTF8filesystem'] is set, the character @ is allowed, because \x40 is not excluded by the regex.

Therefor, I suggest to allow the @ character in filenames in non-utf8-filesystems as well.

To achieve this, the line

$cleanFileName = preg_replace('/[^.[:alnum:]_-]/', '_', trim($fileName));

should be changed to

$cleanFileName = preg_replace('/[^.[:alnum:]@_-]/', '_', trim($fileName));

Actions #1

Updated by Philipp Gampe almost 11 years ago

  • Category set to Miscellaneous
  • Status changed from New to Needs Feedback
  • TYPO3 Version changed from 4.5 to 6.0

This can only go to 6.x as 4.x only receives security and priority bugfixes.

I cannot think of a case where that @ sign makes trouble.
Would you mind to push a patch to gerrit? http://wiki.typo3.org/CWT

Actions #2

Updated by Gerrit Code Review almost 11 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22725

Actions #3

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22725

Actions #4

Updated by Gerrit Code Review over 10 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22725

Actions #5

Updated by Gerrit Code Review over 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 https://review.typo3.org/22725

Actions #6

Updated by Gerrit Code Review about 10 years ago

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

Actions #7

Updated by Gerrit Code Review about 10 years ago

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

Actions #8

Updated by Gerrit Code Review about 10 years ago

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

Actions #9

Updated by Gerrit Code Review about 10 years ago

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

Actions #10

Updated by Gerrit Code Review about 10 years ago

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

Actions #11

Updated by Gerrit Code Review about 10 years ago

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

Actions #12

Updated by Lucas Bremgartner about 10 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF