Diff for /loncom/auth/lonshibauth.pm between versions 1.4 and 1.6

version 1.4, 2021/05/04 18:47:37 version 1.6, 2021/09/21 22:54:26
Line 74  use LONCAPA qw(:DEFAULT); Line 74  use LONCAPA qw(:DEFAULT);
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
     my $target = '/adm/sso';      my $target = '/adm/sso';
     if (($r->user eq '') && ($r->uri() ne $target)) {      if (&Apache::lonnet::get_saml_landing()) {
           $target = '/adm/login';
       }
       my $uri = $r->uri;
       if (($r->user eq '') && ($uri ne $target) && ($uri ne '/adm/sso')) {
         my $lonhost = $Apache::lonnet::perlvar{'lonHostID'};          my $lonhost = $Apache::lonnet::perlvar{'lonHostID'};
         my $hostname = &Apache::lonnet::hostname($lonhost);          my $hostname = &Apache::lonnet::hostname($lonhost);
         if (!$hostname) { $hostname = $r->hostname(); }          if (!$hostname) { $hostname = $r->hostname(); }
Line 87  sub handler { Line 91  sub handler {
         if ($ENV{'QUERY_STRING'} ne '') {          if ($ENV{'QUERY_STRING'} ne '') {
             $dest .= '?'.$ENV{'QUERY_STRING'};              $dest .= '?'.$ENV{'QUERY_STRING'};
         }          }
           unless (($uri eq '/adm/roles') || ($ENV{'QUERY_STRING'} =~ /origurl=/)) {
               $dest.=(($dest=~/\?/)?'&':'?').'origurl='.$uri;
           }
         $r->header_out(Location => $dest);          $r->header_out(Location => $dest);
         return REDIRECT;          return REDIRECT;
     } else {      } else {

Removed from v.1.4  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>