[TYPO3-core] RFC #13750: Bug: Several GIFBUILDER features broken for IM4, IM6 and GM

Joerg Wagner [DigiLog] lists.typo3.org at digilog.de
Thu May 20 09:41:11 CEST 2010


Hi Steffen,

you have used the unit test cases posted by Georg Grossberger in bug 
report 13750. As I stated in my note in that report, the function will 
never pass these tests (neither with nor without the patch) as the 
function was never designed to handle parameter content that is 
partially quoted but has appended parts OUTSIDE the quotes, e.g.:
"C:/Users/Someuser.Domain/Documents/Htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif"[0]

IMHO such parameters are a direct contradiction to the meaning of the 
term "quoted". Here is what I wrote to Georg (see notes in the bug report):

----- snip -----
Considering your testcases:
You write that many tests failed with the patched version. The original 
function version (with or without my patch) will indeed fail on all of 
your testcases which have a closing quote that is NOT at the end of the 
quoted string. The function expects the opening and closing quotes to 
enclose the WHOLE string. But many of your cases have an appended [0] 
after the quoted part of one of the parameters. Does this really happen? 
I am not much aware of the IM and GM parameter structure, but this looks 
like a contradiction to me. Maybe I am overlooking something here but I 
would argue that you cannot quote a parameter and then put a part of it 
outside of the quotes. What is this parameter structure...
    "path/filename.gif"[0]
...meant for that you use so often in your testcases?

If these appended [0] parts in your testcases should indeed be 
irrelevant, than I strongly suggest to stay with the original function 
and my patch. All the remaining testcases should work well with it.
----- snap -----

Cheers, Jörg.


schrieb Steffen Gebert am 10.05.2010 12:30:
> Am 10.05.2010, 10:24 Uhr, schrieb JoH asenau <info at cybercraft.de>:
>
>> Come on folks, this is a major bug, that *breaks important IM/GM features
>> for any Windows user*, so where is the problem about comitting this
>> patch? -
>> Instead of concentrating on new features for upcoming T3 versions,
>> IMHO we
>> should fix those major bugs and blockers of the current versions first.
>
> Hi Joey and Jörg,
>
> I'm willing to review this, unfortunately I don't have good luck with
> the version Jörg sent on Tuesday.
>
> As the IM commands are a very sensible part of TYPO3, I'd really like to
> see unit tests for the changed function(s). For me (on MacOS) only the
> first 2 tests work - even with the patch.
> Nevertheless, I attached the testcase file applied against typo3_src
> (and the same for the trunk-patch, which is also CGL-conform now).
>
> What I don't understand is, how this should break IM4. I tried Susanne's
> snippet under windows, but nothing was broken with IM4. Looking at the
> code in t3lib_div::imageMagickCommand(), I can see that
> unQuoteFilenames() is only called with $switchCompositeParameters = TRUE.
> But this is only the case for gm and im6, isn't it?
>
> By setting it TRUE by hand, I was able to observe the different behavior
> of unQuoteFilenames(), which indeed looks weird, but seems not to harm
> in my case (because I use IM4?).
>
> Could we agree to add the unit tests first and then fix this?
>
> If you can give me a hint, how this should affect IM4, I'd also be happy
> ;-)
>
> Steffen


More information about the TYPO3-team-core mailing list