Correct handling for vpopmail built without clear password option
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@358 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
d26797c6d2
commit
1d1799feb6
@ -82,18 +82,21 @@ sub authsql {
|
|||||||
"Authentication to vpopmail via mysql: $pw_name\@$pw_domain");
|
"Authentication to vpopmail via mysql: $pw_name\@$pw_domain");
|
||||||
|
|
||||||
my $sth = $dbh->prepare(<<SQL);
|
my $sth = $dbh->prepare(<<SQL);
|
||||||
select pw_passwd, pw_clear_passwd
|
select *
|
||||||
from vpopmail
|
from vpopmail
|
||||||
where pw_name = ? and pw_domain = ?
|
where pw_name = ? and pw_domain = ?
|
||||||
SQL
|
SQL
|
||||||
|
|
||||||
$sth->execute( $pw_name, $pw_domain );
|
$sth->execute( $pw_name, $pw_domain );
|
||||||
|
|
||||||
my ($pw_passwd, $pw_clear_passwd) = $sth->fetchrow_array;
|
my $passwd_hash = $sth->fetchrow_hashref;
|
||||||
|
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
$dbh->disconnect;
|
$dbh->disconnect;
|
||||||
|
|
||||||
|
my $pw_clear_passwd = $passwd_hash->{'pw_clear_passwd'};
|
||||||
|
my $pw_passwd = $passwd_hash->{'pw_passwd'};
|
||||||
|
|
||||||
if ( # clear_passwd isn't defined so we cannot support CRAM-MD5
|
if ( # clear_passwd isn't defined so we cannot support CRAM-MD5
|
||||||
( $method =~ /CRAM-MD5/i and not defined $pw_clear_passwd )
|
( $method =~ /CRAM-MD5/i and not defined $pw_clear_passwd )
|
||||||
or
|
or
|
||||||
|
Loading…
Reference in New Issue
Block a user