[TYPO3-core] RFC #15133: Bug: Rendering Images with ImageMagick fails in case of file-permissions

Thorsten Kahler thorsten.kahler at dkd.de
Sun Jul 25 21:49:25 CEST 2010


Hi Alexander,

schrieb Alexander Grein am 16.07.10 09:31:
> 
> The Problem is the new version of fixPermission in t3lib_div with the
> new line (3001):
> if (self::isAllowedAbsPath($path))
> This inquiry is always false in case of the given path contains a
> generated images (because the path is not absolute)
> 
> Solution: Add another inquiry before this one and add the PATH_site if
> nessesary

-1 from me for two reasons:

1) the PHPDoc of the (new) t3lib_div::fixPermissions() clearly states,
that the path has to be absolute
2) there might be (read: probably are) reasons to check for an absolute
path inside fixPermissions(), but checking for an absolute path *before*
and adding *any* absolute path prefix levers that check. The side
effects of that measurement are unpredictable.

I've attached a new patch that adds a call to
t3lib_div::getFileAbsFileName() at those three places inside class
t3lib_stdGraphic where t3lib_div::fixPermissions() is called.

Cheers
Thorsten

-- 

Thorsten Kahler
thorsten.kahler at dkd.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_15133_v2.diff
Type: text/x-diff
Size: 1077 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100725/a382a6c7/attachment.diff>


More information about the TYPO3-team-core mailing list