[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /auth lonacc.pm
raeburn
raeburn at source.lon-capa.org
Sun Jan 3 22:47:01 EST 2021
raeburn Mon Jan 4 03:47:01 2021 EDT
Modified files: (Branch: version_2_11_X)
/loncom/auth lonacc.pm
Log:
- For 2.11
Backport 1.184
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.159.2.17 loncom/auth/lonacc.pm:1.159.2.18
--- loncom/auth/lonacc.pm:1.159.2.17 Sat Jan 2 22:11:26 2021
+++ loncom/auth/lonacc.pm Mon Jan 4 03:47:01 2021
@@ -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 @@
} 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 @@
}
}
} 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 @@
}
# ------------------------------------ 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);
More information about the LON-CAPA-cvs
mailing list