[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Getting started with CGI



At 19.55 -0400 1999.05.22, Chilton Webb wrote:
>>I am rather new to MacPerl and trying to understand how CGI-Scripting
>>works. I understood that you can send your data to the script in a URL
>>like this: <http://www.xy.com/cgi/test.pl?search=bla>. But how can I make
>>the perl script catch the parameter string? Is there a short answer to
>>this question (I don't expect anyone to write a novel)? If not, can
>>someone point me to a good description of the mechanism?

I would recommend using the CGI module, which makes this easy.

  use CGI qw(:standard);
  my $search = param('search');


>Include this sub from PerlSlinger A3 in your code:
>
>sub MoreSecureFormParser
>{ #by Chilton Webb chilton@devhq.com
>#this even patches up the semicolon security hole on Unix boxes.

What security hole are you referring to?  If you use the -T switch -- as
every single Perl CGI script should -- then there is no possible hold to
bite you.

For MacPerl, you can use the CGI Script (Taint Check) extension instead of
the regular CGI Script extension, which allows/enforces the -T switch.  It
is in my site.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org