Nik has asked for the wisdom of the Perl Monks concerning the following question:
They told me to create a location configuration directive on httpd.conf which i did but remove the Require user Nik which i did and in fact when at the form a user gives soemthing as delete a drop the http auth box pops in but i cannot be vbalidatind as user. Any ideas?if( param('Αποστολή') ) { if ( ($name eq 'delete') or ($name eq 'deletelog') or ($name eq 'dr +op')) { if ($ENV{REMOTE_USER} eq 'Nik') { if ($name eq 'delete') { $dbh->do( "DELETE FROM guestbook WHERE name=$pray" ); push @print_later, span( {class=>'lime'}, "Μόλις διαγρά +ψατε τον χρήστη => " ); exit 0; } elsif ($name eq 'deletelog') { $dbh->do( 'DELETE FROM guestlog' ); push @print_later, span( {class=>'tip'}, "Η βάση δεδομένω +ν με τα logs μόλις διαγράφηκε!" ); push @print_later, span( {class=>'yellow'}, $pray ); exit 0; } elsif ($name eq 'drop') { $dbh->do( 'DELETE FROM guestbook' ); push @print_later, span( {class=>'tip'}, "Όλες οι εγγραφέ +ς διαγράφηκαν από τη βάση δεδομένων!" ); exit 0; } } else { print header(-status=>'401 Unauthorized', 'WWW-Authenticate'= +>'Basic realm="Only Nik can do perform that!"'); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Password Protecting specific functions of a Perl Cgi Script
by xorl (Deacon) on Jun 16, 2005 at 13:09 UTC | |
|
Re: Password Protecting specific functions of a Perl Cgi Script
by kutsu (Priest) on Jun 16, 2005 at 14:09 UTC | |
|
Re: Password Protecting specific functions of a Perl Cgi Script
by techcode (Hermit) on Jun 16, 2005 at 22:43 UTC | |
by Nik (Initiate) on Jun 17, 2005 at 13:52 UTC | |
|