Re: mb_check_encoding

From: Date: Sun, 22 Mar 2009 08:52:44 +0000
Subject: Re: mb_check_encoding
References: 1  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-1317@lists.php.net to get a copy of this message
Hi, mb_check_encoding() without the first parameter is never supposed to work properly. I'm thinking of removing this feature. Regards, Moriyoshi On Sat, Mar 21, 2009 at 7:10 AM, Giacomo Mazzocato <gmazzocato@gmail.com> wrote: > if (mb_check_encoding()) { >   echo "request encoding ok" ; > } else { >   echo "request encoding not ok" ; > } > echo "</p>" ; > ?> > >       </body> >     </html> > > If you post the value from your browser, all is ok because the > encoding of the page is recognized by the browser as utf-8 (I think). > But if I call that page with curl simulating an Invalid encoding > attack, > I get the same result(request encoding ok) while I should get request encoding > not ok. > Here's the command I used : > curl  --data-urlencode  $'foo=prov\xef' > http://localhost/mine/test/encoding.php > Thank you in advance > Bye, > Giacomo > > -- > PHP Unicode & I18N Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.i18n (#1317) next »