in reply to CGI::Application and CGI security
display form
#!/usr/local/bin/perl use strict; use warnings; use CGI; $CGI::DISABLE_UPLOADS = 1; # Disable uploads $CGI::POST_MAX = 0; # Maximum number of bytes per post my $cgi = CGI->new(); print $cgi->header(); print " <html> <body> <form method='post' action='posttest.pl'> Username <input type='text' name='uid' size='15' value=''> <br><br> Password <input type='password' name='passwd' size='10' value='' +> <br><br> <input type='hidden' name='rm' value='test'> <input type='submit' name='submit'> </form> </body> </html> ";
parse form
#!/usr/local/bin/perl use strict; use warnings; use CGI; $CGI::DISABLE_UPLOADS = 1; # Disable uploads $CGI::POST_MAX = 0; # Maximum number of bytes per post my $cgi = CGI->new(); my $uid = $cgi->param('uid'); my $passwd = $cgi->param('passwd'); my $rm = $cgi->param('rm'); print $cgi->header, $cgi->start_html; print "uid: '" . $cgi->param('uid') . "<br>"; print "passwd: '" . $cgi->param('passwd') . "<br>"; print "rm: '" . $cgi->param('rm') . "'";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CGI::Application and CGI security
by derby (Abbot) on Jun 30, 2004 at 17:34 UTC |