Diff for /loncom/auth/switchserver.pm between versions 1.32 and 1.33

version 1.32, 2013/09/29 00:49:24 version 1.33, 2015/01/08 21:18:29
Line 96  sub handler { Line 96  sub handler {
   
     if (!defined($switch_to)) { return FORBIDDEN; }      if (!defined($switch_to)) { return FORBIDDEN; }
   
       my $protocol = 'http';
       if ($env{'form.otherserver'}) {
           if ($Apache::lonnet::protocol{$env{'form.otherserver'}} eq 'https') {
               $protocol = $Apache::lonnet::protocol{$env{'form.otherserver'}};
           }
       } 
   
     if ($env{'user.name'} eq 'public'      if ($env{'user.name'} eq 'public'
  && $env{'user.domain'} eq 'public') {   && $env{'user.domain'} eq 'public') {
  my $url = 'http://'.$switch_to.$r->uri;   my $url = $protocol.'://'.$switch_to.$r->uri;
  return &do_redirect($r,$url,1)   return &do_redirect($r,$url,1)
     }      }
   
Line 193  sub handler { Line 200  sub handler {
         $info{'sso.reloginserver'} = $env{'request.sso.reloginserver'};          $info{'sso.reloginserver'} = $env{'request.sso.reloginserver'};
     }      }
     my $token = &Apache::lonnet::tmpput(\%info,$env{'form.otherserver'});      my $token = &Apache::lonnet::tmpput(\%info,$env{'form.otherserver'});
     my $url ='http://'.$switch_to.'/adm/login?'.      my $url =$protocol.'://'.$switch_to.'/adm/login?'.
  'domain='.$env{'user.domain'}.   'domain='.$env{'user.domain'}.
  '&username='.$env{'user.name'}.   '&username='.$env{'user.name'}.
  '&token='.$token;   '&token='.$token;

Removed from v.1.32  
changed lines
  Added in v.1.33


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