Yasuo Ohgaki wrote on 16.01.2014 01:12:
> Hi all,
>
> On Thu, Jan 16, 2014 at 8:50 AM, Yasuo Ohgaki <[email protected]> wrote:
>
>> addslashes() could be vulnerable via char encoding based attacks.
>> It is needed to decide what counter measure we adopt.
>> This is RFC for this issue.
>>
>> https://wiki.php.net/multibyte_char_handling
>>
>> Please comment.
>> Thank you.
>>
>
> I've copied line from "Array Of" RFC and URL was wrong.
> Correct URL is
>
> https://wiki.php.net/rfc/multibyte_char_handling
>
> Sorry for the confusion.
>
> Regards,
>
> --
> Yasuo Ohgaki
> [email protected]
>
Hello Yasuo,
what about mb_trim?
e.g. UTF-8: C2 A0, e2 80 82, e2 80 83, e2 80 af
I currently have lots of untrimmed data in a database since php-trim() and mysql-trim() can't
handle these characters.
There are workarounds like trim($str, chr(0xC2).chr(0xA0)); but they are not really nice to code.
Regards
Thomas