--- loncom/interface/resetpw.pm 2019/04/26 20:22:18 1.45 +++ loncom/interface/resetpw.pm 2019/08/30 00:09:39 1.46 @@ -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.45 2019/04/26 20:22:18 raeburn Exp $ +# $Id: resetpw.pm,v 1.46 2019/08/30 00:09:39 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -305,7 +305,7 @@ END my $earlyout; unless ($passwdconf{'captcha'} eq 'unused') { my ($captcha_chk,$captcha_error) = - &Apache::loncommon::captcha_response('passwords',$server); + &Apache::loncommon::captcha_response('passwords',$server,$dom_in_effect); if ($captcha_chk != 1) { my $error = 'captcha'; if ($passwdconf{'captcha'} eq 'recaptcha') { @@ -359,7 +359,7 @@ END } foreach my $item (@items) { if ($item =~ /^[^\@]+\@[^\@]+\.[^\@\.]+$/) { - unless (grep(/^\Q$item\E$/i,@allemails)) { + unless (grep(/^\Q$item\E$/i,@allemails)) { push(@allemails,$item); } } @@ -727,7 +727,7 @@ sub reset_passwd { '

' .&mt('Please enter a password that you have not used recently.') .'

' - .&display_actions($contact_email,$domdesc) + .&display_actions($contact_email,$domdesc,$token) ); } else { $r->print(&generic_failure_msg($contact_name,$contact_email)); @@ -824,9 +824,13 @@ sub create_passwd { } sub display_actions { - my ($contact_email, $domdesc) = @_; + my ($contact_email,$domdesc,$token) = @_; + my $url = '/adm/resetpw'; + if ($token) { + $url .= '?token='.&escape($token); + } my @msg = (&mt('[_1]Go back[_2] and try again', - '','')); + '','')); my $msg2 = ''; if ($contact_email ne '') { my $escuri = &HTML::Entities::encode('/adm/resetpw','&<>"');