[TYPO3-core] RFC #9194: Bug: wrong handling of 'is_in' list in TCA element type 'input'

Jeff Segars jsegars at alumni.rice.edu
Wed Oct 22 17:57:19 CEST 2008


REMINDER

Masi, are you OK with handling the multi-byte issues in a separate patch?


Vladimir Podkovanov wrote:
> Vladimir Podkovanov wrote:
>> Martin Kutschker wrote:
>>> Vladimir Podkovanov schrieb:
>>>> Hi!
>>>>
>>>> This is an SVN patch request.
>>>>
>>>> Type: Bugfix
>>>>
>>>> Bugtracker references: http://bugs.typo3.org/view.php?id=9194
>>>>
>>>> Branches: TYPO3_4-1, TYPO3_4-2, trunk
>>>>
>>>> Problem:
>>>> when 'is_in' string in TCA element type 'input' ends with symbol '0'
>>>> (say '1234567890') then '0' is not taken into account so 0's stripped
>>>> off from field value
>>>>
>>>> Solution:
>>>> changed logical condition to avoid evaluation of string '0' as false
>>>
>>> Now that you bring that up, I see that this code has another problem:
>>> It's not multi-byte safe. Both the loop and the substr() assume that
>>> each character is only one byte long. What should be done is to use the
>>> character set defined by $LANG->charset and use it with t3lib_cs.
>>>
>>> Masi
>>
>> Well,
>> I've checked now whole class.t3lib_tcemain.php and have found two more 
>> instances where strstr() or substr() using with possible multibyte 
>> values. So maybe we commit currect fix and then fixing 
>> class.t3lib_tcemain.php in new thread.
>>
>> Vladimir
> 
> + found some more places where using strtoupper(), strtolower(), 
> strlen(), str_replace(), ereg_replace() with values from input field 
> that could be in unicode and maybe some more functions should be checked
> 
> Vladimir


More information about the TYPO3-team-core mailing list