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

raeburn raeburn at source.lon-capa.org
Sun Jan 3 22:52:32 EST 2021


raeburn		Mon Jan  4 03:52:32 2021 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/auth	migrateuser.pm 
  Log:
  - For 2.11
    Backport 1.49 (part)
  
  
Index: loncom/auth/migrateuser.pm
diff -u loncom/auth/migrateuser.pm:1.25.2.3 loncom/auth/migrateuser.pm:1.25.2.4
--- loncom/auth/migrateuser.pm:1.25.2.3	Fri Oct 23 20:58:08 2020
+++ loncom/auth/migrateuser.pm	Mon Jan  4 03:52:32 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Starts a user off based of an existing token.
 #
-# $Id: migrateuser.pm,v 1.25.2.3 2020/10/23 20:58:08 raeburn Exp $
+# $Id: migrateuser.pm,v 1.25.2.4 2021/01/04 03:52:32 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -234,9 +234,10 @@
     if (!defined($data{'username'}) || !defined($data{'domain'})) {
         return &goto_login($r);
     }
-    if ($data{'ip'} ne $ENV{'REMOTE_ADDR'}) {
+    my $ip = &Apache::lonnet::get_requestor_ip(); 
+    if ($data{'ip'} ne $ip) {
         &Apache::lonnet::logthis('IP change when session migration requested -- was: '.
-                 $data{'ip'}.'; now: '.$ENV{'REMOTE_ADDR'}.' for '.$data{'username'}.':'.$data{'domain'});
+                 $data{'ip'}.'; now: '.$ip.' for '.$data{'username'}.':'.$data{'domain'});
 	return &ip_changed($r,$data{'domain'},$data{'server'},\%data);
     }
 




More information about the LON-CAPA-cvs mailing list