version 1.176, 2022/06/30 21:04:13
|
version 1.178, 2022/09/17 23:38:50
|
Line 47 use CGI::Cookie();
|
Line 47 use CGI::Cookie();
|
# ------------------------------------------------------------ Successful login
|
# ------------------------------------------------------------ Successful login
|
sub success {
|
sub success {
|
my ($r, $username, $domain, $authhost, $lowerurl, $extra_env,
|
my ($r, $username, $domain, $authhost, $lowerurl, $extra_env,
|
$form,$skipcritical,$cid,$expirepub) = @_;
|
$form,$skipcritical,$cid,$expirepub,$write_to_opener) = @_;
|
|
|
# ------------------------------------------------------------ Get cookie ready
|
# ------------------------------------------------------------ Get cookie ready
|
my $cookie =
|
my $cookie =
|
Line 147 sub success {
|
Line 147 sub success {
|
$destination .= 'selectrole=1&'.$newrole.'=1';
|
$destination .= 'selectrole=1&'.$newrole.'=1';
|
}
|
}
|
}
|
}
|
|
} elsif (defined($form->{display})) {
|
|
if ($destination =~ m{^/adm/email($|\?)}) {
|
|
$destination .= ($destination =~ /\?/) ? '&' : '?' .'display='.&escape($form->{display});
|
|
}
|
}
|
}
|
if (defined($form->{symb})) {
|
if (defined($form->{symb})) {
|
my $destsymb = $form->{symb};
|
my $destsymb = $form->{symb};
|
Line 280 ENDJS
|
Line 284 ENDJS
|
}
|
}
|
$start_page=&Apache::loncommon::start_page('',$js,$args);
|
$start_page=&Apache::loncommon::start_page('',$js,$args);
|
} else {
|
} else {
|
$args->{'redirect'} = [0,$destination];
|
$args->{'redirect'} = [0,$destination,'',$write_to_opener];
|
$start_page=&Apache::loncommon::start_page('Successful Login',
|
$start_page=&Apache::loncommon::start_page('Successful Login',
|
$js,$args);
|
$js,$args);
|
unless ($env{'request.linkprot'}) {
|
unless ($env{'request.linkprot'}) {
|
Line 829 sub handler {
|
Line 833 sub handler {
|
}
|
}
|
if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
|
if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
|
&set_deeplink_login(%form);
|
&set_deeplink_login(%form);
|
|
} elsif ($firsturl eq '/adm/email') {
|
|
if ($form{'display'} && ($form{'mailrecip'} eq "$form{'uname'}:$form{'udom'}")) {
|
|
$env{'request.display'} = $form{'display'};
|
|
$env{'request.mailrecip'} = $form{'mailrecip'};
|
|
}
|
}
|
}
|
$r->internal_redirect($switchto);
|
$r->internal_redirect($switchto);
|
} else {
|
} else {
|
Line 865 sub handler {
|
Line 874 sub handler {
|
}
|
}
|
if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
|
if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
|
&set_deeplink_login(%form);
|
&set_deeplink_login(%form);
|
|
} elsif ($firsturl eq '/adm/email') {
|
|
if ($form{'display'} && ($form{'mailrecip'} eq "$form{'uname'}:$form{'udom'}")) {
|
|
$env{'request.display'} = $form{'display'};
|
|
$env{'request.mailrecip'} = $form{'mailrecip'};
|
|
}
|
}
|
}
|
$r->internal_redirect($switchto);
|
$r->internal_redirect($switchto);
|
} else {
|
} else {
|
Line 904 sub handler {
|
Line 918 sub handler {
|
}
|
}
|
if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
|
if ($form{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
|
&set_deeplink_login(%form);
|
&set_deeplink_login(%form);
|
|
} elsif ($firsturl eq '/adm/email') {
|
|
if ($form{'display'} && ($form{'mailrecip'} eq "$form{'uname'}:$form{'udom'}")) {
|
|
$env{'request.display'} = $form{'display'};
|
|
$env{'request.mailrecip'} = $form{'mailrecip'};
|
|
}
|
}
|
}
|
$r->internal_redirect('/adm/switchserver?otherserver='.$unloaded.'&origurl='.$firsturl);
|
$r->internal_redirect('/adm/switchserver?otherserver='.$unloaded.'&origurl='.$firsturl);
|
return OK;
|
return OK;
|
Line 923 sub handler {
|
Line 942 sub handler {
|
$form{$item} = $sessiondata{$item};
|
$form{$item} = $sessiondata{$item};
|
}
|
}
|
}
|
}
|
|
if ($sessiondata{'origurl'} eq '/adm/email') {
|
|
if (($sessiondata{'display'}) && ($sessiondata{'mailrecip'})) {
|
|
if (&unescape($sessiondata{'mailrecip'}) eq "$form{'uname'}:$form{'udom'}") {
|
|
$form{'display'} = &unescape($sessiondata{'display'});
|
|
$form{'mailrecip'} = &unescape($sessiondata{'mailrecip'});
|
|
}
|
|
}
|
|
}
|
}
|
}
|
}
|
}
|
if ($form{'linkprot'}) {
|
if ($form{'linkprot'}) {
|
Line 1121 sub check_can_host {
|
Line 1148 sub check_can_host {
|
$form);
|
$form);
|
if ($form->{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
|
if ($form->{'firsturl'} =~ m{^/tiny/$match_domain/\w+$}) {
|
$env{'request.deeplink.login'} = $form->{'firsturl'};
|
$env{'request.deeplink.login'} = $form->{'firsturl'};
|
|
} elsif ($form->{'firsturl'} eq '/adm/email') {
|
|
if ($form->{'display'} && ($form->{'mailrecip'} eq $form->{'uname'}.':'.$form->{'udom'})) {
|
|
$env{'request.display'} = $form->{'mailrecip'};
|
|
$env{'request.mailrecip'} = $form->{'mailrecip'};
|
|
}
|
}
|
}
|
if ($form->{'linkprot'}) {
|
if ($form->{'linkprot'}) {
|
$env{'request.linkprot'} = $form->{'linkprot'};
|
$env{'request.linkprot'} = $form->{'linkprot'};
|