--- loncom/lonnet/perl/lonnet.pm 2020/12/18 15:23:03 1.1434 +++ loncom/lonnet/perl/lonnet.pm 2021/01/02 18:38:02 1.1435 @@ -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 @@ sub modifyuserauth { &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 @@ sub get_requestor_ip { $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; } } }