--- loncom/auth/lonacc.pm 2021/01/03 00:12:12 1.159.2.8.2.8 +++ loncom/auth/lonacc.pm 2021/01/04 05:15:21 1.159.2.8.2.9 @@ -1,7 +1,7 @@ # The LearningOnline Network # Cookie Based Access Handler # -# $Id: lonacc.pm,v 1.159.2.8.2.8 2021/01/03 00:12:12 raeburn Exp $ +# $Id: lonacc.pm,v 1.159.2.8.2.9 2021/01/04 05:15:21 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -377,7 +377,7 @@ sub sso_login { } else { # need to login them in, so generate the need data that # migrate expects to do login - my $ip = $r->get_remote_host(); + my $ip = &Apache::lonnet::get_requestor_ip($r); my %info=('ip' => $ip, 'domain' => $domain, 'username' => $user, @@ -727,7 +727,7 @@ sub handler { } } } elsif (($handle =~ /^publicuser_\d+$/) && (&Apache::lonnet::is_portfolio_url($requrl))) { - my $clientip = $r->get_remote_host(); + my $clientip = &Apache::lonnet::get_requestor_ip($r); if (&Apache::lonnet::allowed('bre',$requrl,undef,undef,$clientip) ne 'F') { $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; return HTTP_NOT_ACCEPTABLE; @@ -917,7 +917,7 @@ sub handler { } # ------------------------------------ See if this is a viewable portfolio file if (&Apache::lonnet::is_portfolio_url($requrl)) { - my $clientip = $r->get_remote_host(); + my $clientip = &Apache::lonnet::get_requestor_ip($r); my $access=&Apache::lonnet::allowed('bre',$requrl,undef,undef,$clientip); if ($access eq 'A') { &Apache::restrictedaccess::setup_handler($r);