Bug #30416
closedmeaningfulTempFilePrefix is not multi-byte safe
100%
Description
With meaningfulTempFilePrefix
, a prefix for file names of generated image files can be set. The unit is currently (obviously) bytes, not characters.
This causes trouble with $TYPO3_CONF_VARS['SYS']['UTF8filesystem']
, when the string is truncated exactly in the middle of a multi-byte char, resulting in the file not being accessible via HTTP.
The file name "abcÄ" with a prefix length of 4 would cut the last byte of the Ä, resulting in "abc?".
Thus, substring generation has to respect the charset set of the file name, which is then UTF-8.
Updated by Steffen Gebert about 13 years ago
- Subject changed from meaningfulTempFilePrefix cuts in multi-byte character to meaningfulTempFilePrefix is not multi-byte safe
Updated by Steffen Gebert about 13 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset 4adb178449e842cf9d2c119e769f9ddc730c64a9.
Updated by Steffen Gebert about 13 years ago
- Status changed from Resolved to New
- % Done changed from 100 to 20
- Complexity set to medium
(only pushed to sandbox)
Create a page called abcÄ and use the following code to reproduce:
config.meaningfulTempFilePrefix = 4 page.1 = IMAGE page.1 { file = GIFBUILDER file { XY = [10.w]+20,[10.h]+20 backColor = #ff0000 10 = TEXT 10 { text.data = page:title text.wrap = |(IMG) fontColor = #000000 fontSize = 20 offset = 0,20 } } } page.2 = COA page.2 { 1 = IMG_RESOURCE 1 { file = GIFBUILDER file { XY = [10.w]+20,[10.h]+20 backColor = #00ff00 10 = TEXT 10 { text.data = page:title text.wrap = |(CSS) fontSize = 20 offset = 0,20 fontColor = #000000 } } stdWrap.innerWrap ( <h1 style="background: url(/|) no-repeat;" id="headline"> ) } }
- First image (red one) is outputted as
<img>
, which worked in my tests, although the file name contains the one byte. - Second image (green one) is rendered as CSS background. This does not work.
Updated by Mr. Hudson about 13 years ago
Patch set 1 of change I760f80b8cfa2dcea8b554c24467f56b662d465d9 has been pushed to the review server.
It is available at http://review.typo3.org/5479
Updated by Mr. Hudson about 13 years ago
Patch set 2 of change I760f80b8cfa2dcea8b554c24467f56b662d465d9 has been pushed to the review server.
It is available at http://review.typo3.org/5479
Updated by Mr. Hudson about 13 years ago
Patch set 3 of change I760f80b8cfa2dcea8b554c24467f56b662d465d9 has been pushed to the review server.
It is available at http://review.typo3.org/5479
Updated by Mr. Hudson about 13 years ago
Patch set 4 of change I760f80b8cfa2dcea8b554c24467f56b662d465d9 has been pushed to the review server.
It is available at http://review.typo3.org/5479
Updated by Mr. Hudson about 13 years ago
Patch set 5 of change I760f80b8cfa2dcea8b554c24467f56b662d465d9 has been pushed to the review server.
It is available at http://review.typo3.org/5479
Updated by Steffen Gebert about 13 years ago
- Status changed from New to Resolved
- % Done changed from 20 to 100
Applied in changeset e3a84344e7b9d1717d6fa2726699e5b589f6d8ec.
Updated by Steffen Gebert about 13 years ago
- Category set to Image Cropping
- Target version set to 4.5.7
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed