--- loncom/lontrans.pm 2021/04/18 02:08:46 1.30 +++ loncom/lontrans.pm 2021/07/17 21:48:27 1.33 @@ -1,7 +1,7 @@ # The LearningOnline Network # URL translation for User Files # -# $Id: lontrans.pm,v 1.30 2021/04/18 02:08:46 raeburn Exp $ +# $Id: lontrans.pm,v 1.33 2021/07/17 21:48:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -79,7 +79,7 @@ sub handler { ($remote_ip eq &Apache::lonnet::get_host_ip($lonhost)) || ($vpnint && &Apache::lonnet::ip_match($remote_ip,$vpnint))) { $redirect = $alias; - if ($r->uri=~m{^/raw/}){ + if (($r->uri=~m{^/raw/}) || ($r->uri=~m{^/adm/dns/(hosts|domain)$})) { my %iphost = &Apache::lonnet::get_iphost(); if (exists($iphost{$remote_ip})) { undef($redirect); @@ -89,6 +89,10 @@ sub handler { } if ($redirect) { my $uri = $r->uri; + if (($uri eq '/adm/sso') || ($uri eq '/adm/switchserver') || + ($uri =~ m{^/Shibboleth.sso/})) { + return DECLINED; + } unless ($uri eq '/adm/migrateuser') { my %user; my $handle = &Apache::lonnet::check_for_valid_session($r,undef,\%user); @@ -107,6 +111,9 @@ sub handler { $protocol = 'https'; } my $querystring = $r->args; + if ($uri =~ m{^(/adm/css/)(.+)(.css)$}) { + $uri = $1.&escape($2).$3; + } my $location = $protocol.'://'.$redirect.$uri; if ($querystring) { $location .= "?$querystring";