--- loncom/interface/resetpw.pm 2019/08/30 00:09:39 1.46 +++ loncom/interface/resetpw.pm 2025/02/14 19:01:11 1.52 @@ -1,7 +1,7 @@ # The LearningOnline Network # Allow access to password changing via a token sent to user's e-mail. # -# $Id: resetpw.pm,v 1.46 2019/08/30 00:09:39 raeburn Exp $ +# $Id: resetpw.pm,v 1.52 2025/02/14 19:01:11 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -115,6 +115,7 @@ sub handler { } } my %passwdconf = &Apache::lonnet::get_passwdconf($dom_in_effect); + my $clientip = &Apache::lonnet::get_requestor_ip($r); my $token = $env{'form.token'}; my $useremail = $env{'form.useremail'}; if (($udom ne '') && (!$otherinst) && (!$token)) { @@ -292,7 +293,7 @@ END my $output; if ($token) { $r->print($header); - &reset_passwd($r,$token,$contact_name,$contact_email,\%passwdconf); + &reset_passwd($r,$token,$contact_name,$contact_email,$clientip,\%passwdconf); $r->print(&Apache::loncommon::end_page()); return OK; } elsif ($udom) { @@ -300,7 +301,7 @@ END $output = &invalid_state('baddomain',$domdesc, $contact_name,$contact_email); } elsif ($otherinst) { - ($header,$output) = &homeserver_redirect($uname,$udom,$domdesc,$brcrum); + ($header,$output) = &homeserver_redirect($r,$uname,$udom,$domdesc,$brcrum); } elsif (($uname) || ($useremail)) { my $earlyout; unless ($passwdconf{'captcha'} eq 'unused') { @@ -327,7 +328,7 @@ END my $authtype = &Apache::lonnet::queryauthenticate($uname,$udom); if ($authtype =~ /^internal/) { my ($blocked,$blocktext) = - &Apache::loncommon::blocking_status('passwd',$uname,$udom); + &Apache::loncommon::blocking_status('passwd',$clientip,$uname,$udom); if ($blocked) { $output = '
'.$blocktext.'
' .&display_actions($contact_email,$domdesc); @@ -441,11 +442,11 @@ sub get_uname { $msg .= $contents; } } - $msg .= ''.&mt('Three conditions must be met:') + $msg .= '
'.&mt('Three conditions must be met:').'
' .'