[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /cgi lonauthcgi.pm

raeburn raeburn at source.lon-capa.org
Sun Feb 3 17:10:44 EST 2019


raeburn		Sun Feb  3 22:10:44 2019 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/cgi	lonauthcgi.pm 
  Log:
  - For 2.11
    - Backport 1.16
  
  
Index: loncom/cgi/lonauthcgi.pm
diff -u loncom/cgi/lonauthcgi.pm:1.14 loncom/cgi/lonauthcgi.pm:1.14.2.1
--- loncom/cgi/lonauthcgi.pm:1.14	Mon May  4 15:43:57 2015
+++ loncom/cgi/lonauthcgi.pm	Sun Feb  3 22:10:43 2019
@@ -1,7 +1,7 @@
 #
 # LON-CAPA authorization for cgi-bin scripts
 #
-# $Id: lonauthcgi.pm,v 1.14 2015/05/04 15:43:57 raeburn Exp $
+# $Id: lonauthcgi.pm,v 1.14.2.1 2019/02/03 22:10:43 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -197,10 +197,10 @@
     my %remote_doms;
     my $allowed;
     if ($remote_ip ne '') {
-        if (&Apache::lonnet::hostname($remote_ip) ne '') {
+        my @remote_hosts = &Apache::lonnet::get_hosts_from_ip($remote_ip);
+        if (@remote_hosts) {
             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 '') {




More information about the LON-CAPA-cvs mailing list