Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Extra CGI.pm safety by stripping \x00 bytes?

by dave_the_m (Monsignor)
on May 26, 2005 at 20:58 UTC ( [id://460873]=note: print w/replies, xml ) Need Help??


in reply to Re: Extra CGI.pm safety by stripping \x00 bytes?
in thread Extra CGI.pm safety by stripping \x00 bytes?

Certainly the null byte can appear in utf-8; code points like \x2400, \x2500, . . . all have them
No, utf8 is specifically formulated to avoid null bytes in any codepoints apart from zero, eg
$ perl586 -MDevel::Peek -e'Dump "\x{2400}"' SV = PV(0x8181f00) at 0x816e234 REFCNT = 1 FLAGS = (POK,READONLY,pPOK,UTF8) PV = 0x817c268 "\342\220\200"\0 [UTF8 "\x{2400}"] CUR = 3 LEN = 4
That codepoint is represented by three bytes, none of which is zero.

Dave.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://460873]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-28 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found