[Athens-pm] <a href="my_script.pl?argument1=string>Click this</a> can't fix it!

Philip Lees pjlees at ics.forth.gr
Fri Feb 28 03:20:48 CST 2003


Antonis Faragitakis wrote:

> > if ( $user_pass eq $users{$user_name} ) {
> 
> I used the code you writen in my CGI, the problem was,
> that when you submited the login form without username
> and password you still have access to the system.
> That's why i check if  $user_name and $user_pass

Why not check for those right at the start. Something like:

print_error_page and exit unless $cgi->param( 'user_name' ) and
$cgi->param( 'user_pass' );

Write a sub print_error_page that does just that.

Philip
--
Philip Lees
Working Group on Cardiology
ICS-FORTH, Science and Technology Park of Crete
Vassilika Vouton, P.O. Box 1385, GR 711 10 Heraklion, Crete, GREECE

tel.: +30-2810-391680, fax: +30-2810-391601, e-mail: pjlees at ics.forth.gr

'The aim of high technology should be to simplify, not complicate' -
Hans Christian von Baeyer 




More information about the Athens-pm mailing list