Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

RE: Yet Another Cargo Cult non-use of CGI.pm

by davorg (Chancellor)
on Aug 01, 2000 at 01:04 UTC ( [id://25338]=note: print w/replies, xml ) Need Help??


in reply to Yet Another Cargo Cult non-use of CGI.pm
in thread Upload Security (strip ../, etc.)

Actually, this in one of the few hand-rolled CGI parameter parsers I've seen which doesn't break multi-select fields (well, I suppose it might do if the values contained '|' characters - but it's still better than most!)

Your other points are spot on tho.

--
<http://www.dave.org.uk>

European Perl Conference - Sept 22/24 2000, ICA, London
<http://www.yapc.org/Europe/>
  • Comment on RE: Yet Another Cargo Cult non-use of CGI.pm

Replies are listed 'Best First'.
RE: RE: Yet Another Cargo Cult non-use of CGI.pm
by merlyn (Sage) on Aug 01, 2000 at 01:06 UTC
    Yeah, it breaks it with respect to vertical bars. My worry is that someone will copy that code without understanding, and either remove that line, or not understand the meaning of the vertical bar. (And splitting on vertical bars seems to be the one thing that beginners seem to constantly get wrong on the first few tries.)

    CGI::param gets it right. In a scalar context, you get back the first one seen. In a list context, you get them all. No confusion for either kind of user.

    -- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-25 21:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found