--- loncom/auth/lonacc.pm 2021/01/02 22:11:26 1.159.2.17 +++ loncom/auth/lonacc.pm 2021/01/04 03:47:01 1.159.2.18 @@ -1,7 +1,7 @@ # The LearningOnline Network # Cookie Based Access Handler # -# $Id: lonacc.pm,v 1.159.2.17 2021/01/02 22:11:26 raeburn Exp $ +# $Id: lonacc.pm,v 1.159.2.18 2021/01/04 03:47:01 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -369,7 +369,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, @@ -707,7 +707,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; @@ -897,7 +897,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);