version 1.185, 2021/09/27 02:49:36
|
version 1.187, 2021/09/28 21:16:07
|
Line 123 sub handler {
|
Line 123 sub handler {
|
$protocol = 'http' if ($protocol ne 'https');
|
$protocol = 'http' if ($protocol ne 'https');
|
my $dest = '/adm/roles';
|
my $dest = '/adm/roles';
|
if ($env{'form.firsturl'} ne '') {
|
if ($env{'form.firsturl'} ne '') {
|
$dest = $env{'form.firsturl'};
|
$dest = &HTML::Entities::encode($env{'form.firsturl'},'\'"<>&');
|
}
|
}
|
my %info = (
|
my %info = (
|
balcookie => $lonhost.':'.$balancer_cookie,
|
balcookie => $lonhost.':'.$balancer_cookie,
|
Line 141 sub handler {
|
Line 141 sub handler {
|
}
|
}
|
my $balancer_token = &Apache::lonnet::tmpput(\%info,$found_server);
|
my $balancer_token = &Apache::lonnet::tmpput(\%info,$found_server);
|
if ($balancer_token) {
|
if ($balancer_token) {
|
$dest .= (($dest=~/\?/)?'&;':'?') . 'btoken='.$balancer_token;
|
$dest .= (($dest=~/\?/)?'&':'?') . 'btoken='.$balancer_token;
|
}
|
}
|
unless ($found_server eq $lonhost) {
|
unless ($found_server eq $lonhost) {
|
my $alias = &Apache::lonnet::use_proxy_alias($r,$found_server);
|
my $alias = &Apache::lonnet::use_proxy_alias($r,$found_server);
|
Line 203 sub handler {
|
Line 203 sub handler {
|
&Apache::loncommon::end_page();
|
&Apache::loncommon::end_page();
|
my $dest = '/adm/roles';
|
my $dest = '/adm/roles';
|
if ($env{'form.firsturl'} ne '') {
|
if ($env{'form.firsturl'} ne '') {
|
$dest = $env{'form.firsturl'};
|
$dest = &HTML::Entities::encode($env{'form.firsturl'},'\'"<>&');
|
}
|
}
|
if (($env{'form.ltoken'}) || ($linkprot)) {
|
if (($env{'form.ltoken'}) || ($linkprot)) {
|
unless ($linkprot) {
|
unless ($linkprot) {
|
Line 654 ENDSAMLJS
|
Line 654 ENDSAMLJS
|
alink => "$alink",
|
alink => "$alink",
|
onload => 'javascript:enableInput();',);
|
onload => 'javascript:enableInput();',);
|
|
|
my ($headextra,$headextra_exempt,%defaultdomconf);
|
my ($headextra,$headextra_exempt);
|
$headextra = $defaultdomconf{$defdom.'.login.headtag_'.$lonhost_in_use};
|
$headextra = $defaultdomconf{$defdom.'.login.headtag_'.$lonhost_in_use};
|
$headextra_exempt = $defaultdomconf{$domain.'.login.headtag_exempt_'.$lonhost_in_use};
|
$headextra_exempt = $defaultdomconf{$domain.'.login.headtag_exempt_'.$lonhost_in_use};
|
if ($headextra) {
|
if ($headextra) {
|
Line 795 HEADER
|
Line 795 HEADER
|
if ($samlssourl ne '') {
|
if ($samlssourl ne '') {
|
$ssologin = $samlssourl;
|
$ssologin = $samlssourl;
|
}
|
}
|
|
if ($env{'form.firsturl'} ne '') {
|
|
$ssologin .= (($ssologin=~/\?/)?'&':'?') .
|
|
'origurl='.&HTML::Entities::encode($env{'form.firsturl'},'\'<>&"');
|
|
}
|
my $ssohref;
|
my $ssohref;
|
if ($samlssoimg ne '') {
|
if ($samlssoimg ne '') {
|
$ssohref = '<a href="'.$ssologin.'" title="'.$samltooltip.'"><img src="'.$samlssoimg.'" alt="'.$samlssoalt.'" /></a>';
|
$ssohref = '<a href="'.$ssologin.'" title="'.$samltooltip.'"><img src="'.$samlssoimg.'" alt="'.$samlssoalt.'" /></a>';
|
} else {
|
} else {
|
$ssohref = '<a href="'.$ssologin.'">'.$samlssotext.'</a>';
|
$ssohref = '<a href="'.$ssologin.'">'.$samlssotext.'</a>';
|
}
|
}
|
if ($env{'form.firsturl'}) {
|
|
$ssologin .= '?origurl='.&HTML::Entities::encode($env{'form.firsturl'},'<>&"');
|
|
}
|
|
if (($env{'form.saml'} eq 'no') ||
|
if (($env{'form.saml'} eq 'no') ||
|
(($env{'form.username'} ne '') && ($env{'form.domain'} ne ''))) {
|
(($env{'form.username'} ne '') && ($env{'form.domain'} ne ''))) {
|
$ssoauthstyle = 'none';
|
$ssoauthstyle = 'none';
|
Line 1021 sub redirect_page {
|
Line 1022 sub redirect_page {
|
}
|
}
|
my $url = $protocol.'://'.$hostname.$path;
|
my $url = $protocol.'://'.$hostname.$path;
|
if ($env{'form.firsturl'} ne '') {
|
if ($env{'form.firsturl'} ne '') {
|
$url .='?firsturl='.$env{'form.firsturl'};
|
$url .='?firsturl='.&HTML::Entities::encode($env{'form.firsturl'},'\'"<>&');;
|
}
|
}
|
if ($linkprot) {
|
if ($linkprot) {
|
my $ltoken = &Apache::lonnet::tmpput({linkprot => $linkprot},$desthost);
|
my $ltoken = &Apache::lonnet::tmpput({linkprot => $linkprot},$desthost);
|
if ($ltoken) {
|
if ($ltoken) {
|
$url .= (($url =~ /\?/) ? '&' : '?').'ltoken='.$ltoken;
|
$url .= (($url =~ /\?/) ? '&' : '?').'ltoken='.$ltoken;
|
}
|
}
|
}
|
}
|
my $start_page = &Apache::loncommon::start_page('Switching Server ...',undef,
|
my $start_page = &Apache::loncommon::start_page('Switching Server ...',undef,
|