diff options
| author | fukachan <fukachan> | 2002-07-18 23:17:10 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-07-18 23:17:10 +0000 |
| commit | 4dec6f69a9bfb92a4a2b4cdf8fb64f3a103d6843 (patch) | |
| tree | c0bd237f625c9454523f23484000681801195198 /fml/lib/FML/Command | |
| parent | 040735b05bd06f2e37e9f0a4368ad7f7ee9c484a (diff) | |
| download | fml8-4dec6f69a9bfb92a4a2b4cdf8fb64f3a103d6843.tar.gz fml8-4dec6f69a9bfb92a4a2b4cdf8fb64f3a103d6843.tar.bz2 fml8-4dec6f69a9bfb92a4a2b4cdf8fb64f3a103d6843.zip | |
check user matching
Diffstat (limited to 'fml/lib/FML/Command')
| -rw-r--r-- | fml/lib/FML/Command/Auth.pm | 16 |
1 files changed, 11 insertions, 5 deletions
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; + } } } } |
