Subject: | Incorrect password but htCheckPassword returns valid |
Date: | Wed, 16 Aug 2006 15:38:25 +0200 |
To: | <bug-Apache-Htpasswd [...] rt.cpan.org> |
From: | webmaster [...] desipro.de |
I have just created a little sample:
#!/usr/bin/perl
use Apache::Htpasswd;
$file = "/data/Testrepos/conf/htpasswd";
$foo = new Apache::Htpasswd({passwdFile => $file,
ReadOnly => 1,}
);
# Check that a password is correct
$valid = $foo->htCheckPassword("admin", "superuse");
if($valid)
{
print "Pass is valid\n";
}
else
{
print "Pass is invalid\n";
}
But this sample code returns a valid pass in case I use the password: superuse, like in the above code.
The real password however is: superuser , which also returns valid. If I use another pass for example: superus , it reaturns invalid as expected.
Any Idea what is wrong here?
Attached is the htpasswd file I used for the test, I create the passwords inside this file with htpasswd
Thanks Richard
Message body not shown because it is not plain text.