--- loncom/cgi/lonauthcgi.pm 2021/01/04 03:57:04 1.14.2.2 +++ loncom/cgi/lonauthcgi.pm 2016/07/25 19:50:01 1.15 @@ -1,7 +1,7 @@ # # LON-CAPA authorization for cgi-bin scripts # -# $Id: lonauthcgi.pm,v 1.14.2.2 2021/01/04 03:57:04 raeburn Exp $ +# $Id: lonauthcgi.pm,v 1.15 2016/07/25 19:50:01 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -92,7 +92,7 @@ sub check_ipbased_access { my ($page,$ip) = @_; my $allowed; if (!defined($ip)) { - $ip = &Apache::lonnet::get_requestor_ip(); + $ip = $ENV{'REMOTE_ADDR'}; } if ($ip eq '127.0.0.1') { $allowed = 1; @@ -197,10 +197,10 @@ sub check_domain_ip { my %remote_doms; my $allowed; if ($remote_ip ne '') { - my @remote_hosts = &Apache::lonnet::get_hosts_from_ip($remote_ip); - if (@remote_hosts) { + if (&Apache::lonnet::hostname($remote_ip) ne '') { my @poss_domains = &Apache::lonnet::current_machine_domains(); if (@poss_domains > 0) { + my @remote_hosts = &Apache::lonnet::get_hosts_from_ip($remote_ip); foreach my $hostid (@remote_hosts) { my $hostdom = &Apache::lonnet::host_domain($hostid); if ($hostdom ne '') { @@ -383,6 +383,7 @@ sub serverstatus_titles { 'checksums' => 'LON-CAPA Module Checking', 'diskusage' => 'Course/Community Disk Usage', 'clusterstatus' => 'Domain status', + 'certstatus' => 'LON-CAPA SSL Certificates Status', 'metadata_keywords' => 'Display Metadata Keywords', 'metadata_harvest' => 'Harvest Metadata Searches', 'takeoffline' => 'Offline - replace Log-in page',