Diff for /loncom/interface/resetpw.pm between versions 1.36 and 1.37

version 1.36, 2013/08/17 00:34:29 version 1.37, 2016/01/27 00:24:09
Line 116  sub handler { Line 116  sub handler {
         my $authtype = &Apache::lonnet::queryauthenticate($uname,$udom);          my $authtype = &Apache::lonnet::queryauthenticate($uname,$udom);
         if ($authtype =~ /^internal/) {          if ($authtype =~ /^internal/) {
             my $useremail = $env{'form.useremail'};              my $useremail = $env{'form.useremail'};
             if ($useremail !~ /^[^\@]+\@[^\@]+\.[^\@\.]+$/) {              my ($blocked,$blocktext) =
                 $output = &invalid_state('baduseremail',$domdesc,                  &Apache::loncommon::blocking_status('passwd',$uname,$udom);
                                          $contact_name,$contact_email);              if ($blocked) {
                   $output = '<p class="LC_warning">'.$blocktext.'</p>'
                             .&display_actions($contact_email,$domdesc);
               } elsif ($useremail !~ /^[^\@]+\@[^\@]+\.[^\@\.]+$/) {
                       $output = &invalid_state('baduseremail',$domdesc,
                                                $contact_name,$contact_email);
             } else {              } else {
                 my %userinfo =                   my %userinfo = 
     &Apache::lonnet::get('environment',\@emailtypes,      &Apache::lonnet::get('environment',\@emailtypes,
Line 310  sub reset_passwd { Line 315  sub reset_passwd {
         ($data{'email'}  =~ /^[^\@]+\@[^\@]+\.[^\@\.]+$/) &&           ($data{'email'}  =~ /^[^\@]+\@[^\@]+\.[^\@\.]+$/) && 
         ($data{'temppasswd'} =~/^\w+$/)) {          ($data{'temppasswd'} =~/^\w+$/)) {
         my $reqtime = &Apache::lonlocal::locallocaltime($data{'time'});          my $reqtime = &Apache::lonlocal::locallocaltime($data{'time'});
         if ($now - $data{'time'} < 7200) {          my ($blocked,$blocktext) =
               &Apache::loncommon::blocking_status('passwd',$data{'username'},$data{'domain'});
           if ($blocked) {
               $msg = '<p class="LC_warning">'.$blocktext.'</p>';
               return $msg;
           } elsif ($now - $data{'time'} < 7200) {
             if ($env{'form.action'} eq 'verify_and_change_pass') {              if ($env{'form.action'} eq 'verify_and_change_pass') {
                 unless (($env{'form.uname'} eq $data{'username'}) && ($env{'form.udom'} eq $data{'domain'}) && ($env{'form.email'} eq $data{'email'})) {                  unless (($env{'form.uname'} eq $data{'username'}) && ($env{'form.udom'} eq $data{'domain'}) && ($env{'form.email'} eq $data{'email'})) {
                     $msg = &generic_failure_msg($contact_name,$contact_email);                      $msg = &generic_failure_msg($contact_name,$contact_email);

Removed from v.1.36  
changed lines
  Added in v.1.37


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.