version 1.196, 2021/10/25 15:26:27
|
version 1.199, 2021/10/26 15:52:54
|
Line 305 sub sso_login {
|
Line 305 sub sso_login {
|
my $query = $r->args; |
my $query = $r->args; |
my %form; |
my %form; |
if ($query) { |
if ($query) { |
my @items = ('role','symb','iptoken','origurl','ltoken','linkkey'); |
my @items = ('role','symb','iptoken','origurl','ltoken','linkkey','logtoken'); |
&Apache::loncommon::get_unprocessed_cgi($query,\@items); |
&Apache::loncommon::get_unprocessed_cgi($query,\@items); |
foreach my $item (@items) { |
foreach my $item (@items) { |
if (defined($env{'form.'.$item})) { |
if (defined($env{'form.'.$item})) { |
Line 324 sub sso_login {
|
Line 324 sub sso_login {
|
} |
} |
|
|
my ($linkprot,$linkkey); |
my ($linkprot,$linkkey); |
|
if ($form{'logtoken'}) { |
|
my ($firsturl,@rest); |
|
my $lonhost = $r->dir_config('lonHostID'); |
|
my $tmpinfo = &Apache::lonnet::reply('tmpget:'.$form{'logtoken'},$lonhost); |
|
my $delete = &Apache::lonnet::tmpdel($form{'logtoken'}); |
|
(undef,$firsturl,@rest) = split(/&/,$tmpinfo); |
|
foreach my $item (@rest) { |
|
my ($key,$value) = split(/=/,$item); |
|
$form{$key} = &unescape($value); |
|
} |
|
if ($firsturl =~ m{^/tiny/$match_domain/\w+$}) { |
|
$form{'origurl'} = $firsturl; |
|
} |
|
} |
if ($form{'ltoken'}) { |
if ($form{'ltoken'}) { |
my %link_info = &Apache::lonnet::tmpget($form{'ltoken'}); |
my %link_info = &Apache::lonnet::tmpget($form{'ltoken'}); |
$linkprot = $link_info{'linkprot'}; |
$linkprot = $link_info{'linkprot'}; |
Line 389 sub sso_login {
|
Line 403 sub sso_login {
|
} |
} |
if ($env{'request.deeplink.login'}) { |
if ($env{'request.deeplink.login'}) { |
if ($linkprot) { |
if ($linkprot) { |
$env{'request.linkprot'} = $linkprot); |
$env{'request.linkprot'} = $linkprot; |
} elsif ($linkkey ne '') { |
} elsif ($linkkey ne '') { |
$env{'request.linkkey'} = $linkkey); |
$env{'request.linkkey'} = $linkkey; |
} |
} |
} |
} |
$env{'request.sso.login'} = 1; |
$env{'request.sso.login'} = 1; |
Line 626 sub handler {
|
Line 640 sub handler {
|
if (($found_server) && ($balancer_cookie =~ /^\Q$env{'user.domain'}\E_\Q$env{'user.name'}\E_/)) { |
if (($found_server) && ($balancer_cookie =~ /^\Q$env{'user.domain'}\E_\Q$env{'user.name'}\E_/)) { |
$otherserver = $found_server; |
$otherserver = $found_server; |
} |
} |
unless ($requrl eq '/adm/switchserver') { |
unless ($requrl eq '/adm/switchserver') { |
$r->set_handlers('PerlResponseHandler'=> |
$r->set_handlers('PerlResponseHandler'=> |
[\&Apache::switchserver::handler]); |
[\&Apache::switchserver::handler]); |
} |
} |
Line 788 sub handler {
|
Line 802 sub handler {
|
} |
} |
} |
} |
} elsif (($handle =~ /^publicuser_\d+$/) && (&Apache::lonnet::is_portfolio_url($requrl))) { |
} elsif (($handle =~ /^publicuser_\d+$/) && (&Apache::lonnet::is_portfolio_url($requrl))) { |
my $clientip = &Apache::lonnet::get_requestor_ip($r); |
my $clientip = &Apache::lonnet::get_requestor_ip($r); |
if (&Apache::lonnet::allowed('bre',$requrl,undef,undef,$clientip) ne 'F') { |
if (&Apache::lonnet::allowed('bre',$requrl,undef,undef,$clientip) ne 'F') { |
$env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; |
$env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; |
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
Line 857 sub handler {
|
Line 871 sub handler {
|
my ($map,$mid,$murl)=&Apache::lonnet::decode_symb($symb); |
my ($map,$mid,$murl)=&Apache::lonnet::decode_symb($symb); |
if ($map =~ /\.page$/) { |
if ($map =~ /\.page$/) { |
my $mapsymb = &Apache::lonnet::symbread($map); |
my $mapsymb = &Apache::lonnet::symbread($map); |
($map,$mid,$murl)=&Apache::lonnet::decode_symb($mapsymb); |
($map,$mid,$murl)=&Apache::lonnet::decode_symb($mapsymb); |
} |
} |
&Apache::lonnet::symblist($map,$murl => [$murl,$mid], |
&Apache::lonnet::symblist($map,$murl => [$murl,$mid], |
'last_known' =>[$murl,$mid]); |
'last_known' =>[$murl,$mid]); |