[LON-CAPA-cvs] cvs: loncom / lontrans.pm

raeburn raeburn at source.lon-capa.org
Fri Oct 8 10:36:51 EDT 2021


raeburn		Fri Oct  8 14:36:51 2021 EDT

  Modified files:              
    /loncom	lontrans.pm 
  Log:
  - Bug 6914
    Domain configuration for WAF/Proxy includes Y/N option for use of alias in
    redirection to /adm/sso for server(s) supporting Shibboleth Single Sign On.
  
  
Index: loncom/lontrans.pm
diff -u loncom/lontrans.pm:1.35 loncom/lontrans.pm:1.36
--- loncom/lontrans.pm:1.35	Wed Oct  6 19:38:29 2021
+++ loncom/lontrans.pm	Fri Oct  8 14:36:51 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # URL translation for User Files
 #
-# $Id: lontrans.pm,v 1.35 2021/10/06 19:38:29 raeburn Exp $
+# $Id: lontrans.pm,v 1.36 2021/10/08 14:36:51 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -70,10 +70,17 @@
                 if (($vpnext && &Apache::lonnet::ip_match($remote_ip,$vpnext)) &&
                     ($r->uri !~ m{^/adm/(lti|launch)/})) {
                     $redirect = $hostname;
-                    if ($redirect eq $hdrhost) {
+                }
+                if ($r->uri eq '/adm/sso') {
+                    if (&Apache::lonnet::alias_shibboleth($lonhost)) {
                         undef($redirect);
+                    } else {
+                        $redirect = $hostname;
                     }
                 }
+                if ($redirect eq $hdrhost) {
+                    undef($redirect);
+                }
             } elsif ($hdrhost eq $hostname) {
                 $remote_ip = &Apache::lonnet::get_requestor_ip($r,REMOTE_NOLOOKUP,1);
                 unless (($remote_ip eq '127.0.0.1') || ($remote_ip eq '::1') ||
@@ -86,13 +93,16 @@
                         if (exists($iphost{$remote_ip})) {
                             undef($redirect);
                         }
+                    } elsif ($r->uri eq '/adm/sso') {
+                        unless (&Apache::lonnet::alias_shibboleth($lonhost)) {
+                            undef($redirect);
+                        }
                     }
                 }
             }
             if ($redirect) {
                 my $uri = $r->uri;
-                if (($uri eq '/adm/sso') || ($uri eq '/adm/switchserver') ||
-                    ($uri =~ m{^/Shibboleth.sso/})) {
+                if (($uri eq '/adm/switchserver') || ($uri =~ m{^/Shibboleth.sso/})) {
                     return DECLINED;
                 }
                 unless ($uri eq '/adm/migrateuser') {




More information about the LON-CAPA-cvs mailing list