--- loncom/auth/lonacc.pm 2020/10/20 01:38:12 1.183 +++ loncom/auth/lonacc.pm 2020/12/18 15:23:03 1.184 @@ -1,7 +1,7 @@ # The LearningOnline Network # Cookie Based Access Handler # -# $Id: lonacc.pm,v 1.183 2020/10/20 01:38:12 raeburn Exp $ +# $Id: lonacc.pm,v 1.184 2020/12/18 15:23:03 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -386,7 +386,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, @@ -718,7 +718,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; @@ -908,7 +908,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);