[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Sat Jan 2 13:38:02 EST 2021


raeburn		Sat Jan  2 18:38:02 2021 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Bug 6914
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1434 loncom/lonnet/perl/lonnet.pm:1.1435
--- loncom/lonnet/perl/lonnet.pm:1.1434	Fri Dec 18 15:23:03 2020
+++ loncom/lonnet/perl/lonnet.pm	Sat Jan  2 18:38:02 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1434 2020/12/18 15:23:03 raeburn Exp $
+# $Id: lonnet.pm,v 1.1435 2021/01/02 18:38:02 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -10332,7 +10332,7 @@
     &log($udom,,$uname,$uhome,
         'Authentication changed by '.$env{'user.domain'}.', '.
                                      $env{'user.name'}.', '.$umode.
-         '(Remote '.$ENV{'REMOTE_ADDR'}.'): '.$reply);
+         '(Remote '.$ip.'): '.$reply);
     unless ($reply eq 'ok') {
         &logthis('Authentication mode error: '.$reply);
 	return 'error: '.$reply;
@@ -14309,10 +14309,10 @@
                     $xfor = $ENV{'HTTP_X_FORWARDED_FOR'};
                 }
                 if (($ip eq '') && ($xfor ne '')) {
-                    my @ips = reverse(split(/\s*,\s*/,$xfor));
                     foreach my $poss_ip (reverse(split(/\s*,\s*/,$xfor))) {
                         unless (&ip_match($poss_ip,$proxyinfo->{'trusted'})) {
                             $ip = $poss_ip;
+                            last;
                         }
                     }
                 }




More information about the LON-CAPA-cvs mailing list