[LON-CAPA-cvs] cvs: loncom /auth lonlogin.pm

raeburn raeburn at source.lon-capa.org
Wed Sep 18 11:11:31 EDT 2024


raeburn		Wed Sep 18 15:11:31 2024 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
  Log:
  - Don't escape iframe if re-authentication required after launch from deeplink
    on loadbalancer because IP change was detected when switching to session-
    hosting server.
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.207 loncom/auth/lonlogin.pm:1.208
--- loncom/auth/lonlogin.pm:1.207	Tue Nov 21 19:52:18 2023
+++ loncom/auth/lonlogin.pm	Wed Sep 18 15:11:31 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.207 2023/11/21 19:52:18 raeburn Exp $
+# $Id: lonlogin.pm,v 1.208 2024/09/18 15:11:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -857,8 +857,17 @@
    .' style="margin:0 auto; padding:10px; width:90%; height: auto; background-color:#FFFFFF;">'
 );
 
+    my $target = '_top';
+    if ($sessiondata{'linkprot'}) {
+        my ($linkprotector,$deeplink) = split(/:/,$sessiondata{'linkprot'},2);
+        if (($deeplink eq $sessiondata{'origurl'}) &&
+            (($sessiondata{'linkprotuser'} eq $sessiondata{'username'}.':'.$sessiondata{'domain'}) ||
+             ($sessiondata{'linkprotuser'} eq $sessiondata{'username'}))) {
+            $target = '_self';
+        }
+    }
     $r->print(<<ENDSERVERFORM);
-<form name="server" action="/adm/authenticate" method="post" target="_top">
+<form name="server" action="/adm/authenticate" method="post" target="$target">
    <input type="hidden" name="logtoken" value="$logtoken" />
    <input type="hidden" name="serverid" value="$lonhost" />
    <input type="hidden" name="uname" value="" />




More information about the LON-CAPA-cvs mailing list