[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /auth switchserver.pm

raeburn raeburn at source.lon-capa.org
Sun Jan 3 22:54:38 EST 2021


raeburn		Mon Jan  4 03:54:38 2021 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/auth	switchserver.pm 
  Log:
  - For 2.11
    Backport 1.52, 1.53
  
  
Index: loncom/auth/switchserver.pm
diff -u loncom/auth/switchserver.pm:1.35.2.4 loncom/auth/switchserver.pm:1.35.2.5
--- loncom/auth/switchserver.pm:1.35.2.4	Sun Oct 25 02:25:27 2020
+++ loncom/auth/switchserver.pm	Mon Jan  4 03:54:38 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Switch Servers Handler
 #
-# $Id: switchserver.pm,v 1.35.2.4 2020/10/25 02:25:27 raeburn Exp $
+# $Id: switchserver.pm,v 1.35.2.5 2021/01/04 03:54:38 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -203,7 +203,8 @@
     } else {
         $logmsg .= " (no role)";
     }
-    $logmsg .= ' '.$ENV{'REMOTE_ADDR'};
+    my $ip = &Apache::lonnet::get_requestor_ip();
+    $logmsg .= ' '.$ip;
     &Apache::lonnet::log($env{'user.domain'},$env{'user.name'},
 			 $env{'user.home'},$logmsg);
 
@@ -248,7 +249,7 @@
         $otherbalcookie = $env{'request.balancercookie'};
     }
 
-    my %info=('ip'       => $ENV{'REMOTE_ADDR'},
+    my %info=('ip'       => $ip,
 	      'domain'   => $env{'user.domain'},
 	      'username' => $env{'user.name'},
 	      'role'     => $env{'form.role'},




More information about the LON-CAPA-cvs mailing list