Diff for /loncom/auth/lonlogin.pm between versions 1.158.2.9.2.3 and 1.158.2.10

version 1.158.2.9.2.3, 2021/01/04 12:50:06 version 1.158.2.10, 2020/10/24 19:49:06
Line 51  sub handler { Line 51  sub handler {
     if (!defined($env{'form.firsturl'})) {      if (!defined($env{'form.firsturl'})) {
         &Apache::lonacc::get_posted_cgi($r,['firsturl']);          &Apache::lonacc::get_posted_cgi($r,['firsturl']);
     }      }
     if (!defined($env{'form.firsturl'})) {  
         if ($ENV{'REDIRECT_URL'} =~ m{^/+tiny/+$LONCAPA::match_domain/+\w+$}) {  
             $env{'form.firsturl'} = $ENV{'REDIRECT_URL'};  
         }  
     }  
   
 # -- check if they are a migrating user  # -- check if they are a migrating user
     if (defined($env{'form.token'})) {      if (defined($env{'form.token'})) {
Line 377  sub handler { Line 372  sub handler {
             next if ($hostid eq $lonhost);              next if ($hostid eq $lonhost);
             my $hostname = &Apache::lonnet::hostname($hostid);              my $hostname = &Apache::lonnet::hostname($hostid);
             next if (($hostname eq '') || ($spareservers{$hostname}));              next if (($hostname eq '') || ($spareservers{$hostname}));
             $spareservers{$hostname} = 1;  
             my $protocol = $Apache::lonnet::protocol{$hostid};              my $protocol = $Apache::lonnet::protocol{$hostid};
             $protocol = 'http' if ($protocol ne 'https');              $protocol = 'http' if ($protocol ne 'https');
             $spares.='<br /><a href="'.$protocol.'://'.              $spares.='<br /><a href="'.$protocol.'://'.
Line 508  ENDSCRIPT Line 502  ENDSCRIPT
         my $omitextra;          my $omitextra;
         if ($headextra_exempt ne '') {          if ($headextra_exempt ne '') {
             my @exempt = split(',',$headextra_exempt);              my @exempt = split(',',$headextra_exempt);
             my $ip = &Apache::lonnet::get_requestor_ip();              my $ip = $ENV{'REMOTE_ADDR'};
             if (grep(/^\Q$ip\E$/,@exempt)) {              if (grep(/^\Q$ip\E$/,@exempt)) {
                 $omitextra = 1;                  $omitextra = 1;
             }              }
Line 751  sub check_loginvia { Line 745  sub check_loginvia {
     my $output;      my $output;
     if ($loginvia ne '') {      if ($loginvia ne '') {
         my $noredirect;          my $noredirect;
         my $ip = &Apache::lonnet::get_requestor_ip();          my $ip = $ENV{'REMOTE_ADDR'};
         if ($ip eq '127.0.0.1') {          if ($ip eq '127.0.0.1') {
             $noredirect = 1;              $noredirect = 1;
         } else {          } else {

Removed from v.1.158.2.9.2.3  
changed lines
  Added in v.1.158.2.10


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>