[TYPO3-core] RFC: #15278: imagefile_ext is used too restrictive

Georg Ringer mail at ringerge.org
Thu Jul 29 09:57:53 CEST 2010


Hi,

this is a SVN patch request.

Type: Bugfix

Bugtracker references:
http://bugs.typo3.org/view.php?id=15278

Branches: trunk, 4-4, 4-3

Problem:
$TYPO3_CONF_VARS['GFX']['imagefile_ext'] is used to limit the allowed
files for image handling. It is used too restrictive. Images which are
included via TS are also not handled which is leading to the following
major problem:

If set to 'png' and using TS to include a jpg file, the image dimensions
are not calculated, leading to the attributes width="" and height="" or
even not rendering the image itself.

IMO removing the checks is the best solution as imagefile_ext is used in
tceforms anyway to prohibit editors to use not allowed image files.

Solution:
Remove the checks in t3lib_stdgraphic

How to test:
1.) Set $TYPO3_CONF_VARS['GFX']['imagefile_ext'] = 'png';
2.) Use a TS like
----
page.10 = IMAGE
page.10.file = fileadmin/dummy.jpg
-----
3.) See the wrong output
4.) Apply patch and recheck.

Additional information:
Patch is not applying CGL to make a review easier. 2 lines are really
changed which are:
- if (t3lib_div::inList($this->imageFileExt,$newExt))	{
- if (file_exists($imageFile) &&
t3lib_div::inList($this->imageFileExt,strtolower($reg[0])))	{

regards
Georg
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 15278-restrictive-imagefile_ext.patch
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100729/f83cc408/attachment.asc>


More information about the TYPO3-team-core mailing list