From 4dec6f69a9bfb92a4a2b4cdf8fb64f3a103d6843 Mon Sep 17 00:00:00 2001 From: fukachan Date: Thu, 18 Jul 2002 23:17:10 +0000 Subject: check user matching --- fml/lib/FML/Command/Auth.pm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'fml') diff --git a/fml/lib/FML/Command/Auth.pm b/fml/lib/FML/Command/Auth.pm index 0fd98b39..fbb9cafd 100644 --- a/fml/lib/FML/Command/Auth.pm +++ b/fml/lib/FML/Command/Auth.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Auth.pm,v 1.9 2002/06/01 05:09:23 fukachan Exp $ +# $FML: Auth.pm,v 1.10 2002/07/02 12:01:38 fukachan Exp $ # package FML::Command::Auth; @@ -146,6 +146,9 @@ sub check_admin_member_password # get candidates my ($user, $domain) = split(/\@/, $address); + use FML::Credential; + my $cred = new FML::Credential; + # search $user in password database map, which has a hash of # { $user => $encryptd_passwrod }. for my $map (@$maplist) { @@ -161,10 +164,13 @@ sub check_admin_member_password my ($u, $p_infile) = split(/\s+/, $r); my $p_input = crypt( $password, $p_infile ); - # password match - if ($p_infile eq $p_input) { - Log("check_password: password match"); - return 1; + # 1.1 user match ? + if ($cred->is_same_address($u, $address)) { + # 1.2 password match ? + if ($p_infile eq $p_input) { + Log("check_password: password match"); + return 1; + } } } } -- cgit v1.2.1