Hi timothy,
thanks for your help: now with the or assignement of the variable to an
empty string, I don't get any more an error message.
But I don't know yet, why the problem occured.
$password is defined in conf.cgi and $pass is a value from the html form
(i checked the form the input seems correct to me: <input type="password"
name="passwort">)
now I'm quite curious, why the script don't tell me anymore "unassigned
value" and passes through the if condition. As $password is "blabla" $pass
must have got the value from the form.
thanks for your help
max attems
the code:
#!/usr/bin/perl -Tw
use CGI;
#defines all the variables
sub cleanup;
my ($query, $zeile, $num, $pass, $email_adress, $name, $status, $day);
my ($year, $email, $test, $postdate, $month, $passwort, $recipient);
my ($org, $adress, $mailprog, $subject, $email_header, $info);
my (@emails, @emails_unsor, @text, %to);
my $abozahl = 0;
require '/www/37/cgi-bin/mail/conf.cgi';
# Paßwortschutz und überprüft übernommene Formulardaten
$query = new CGI;
$num = cleanup($query->param('nummer'))|| "";
$pass = cleanup($query->param('passwort')) || "";
$test = cleanup($query->param('test'))|| "";
if( $pass ne $password ) {
print "Error: Access denied, invalid password.\n";
exit;
}
#.... some more code ......
# Remove some HTML special characters from a string.
sub cleanup {
my $str = $_[0];
$str =~ s/[<>"'&]//igs;
return $str;
}
# Shut up misguided -w warnings about "used only once". Has no functional
meaning.
sub CGI_pl_sillyness {
my $zz;
$zz = $password;
$zz = $email_header;
}