version 1.151, 2014/01/04 23:21:22
|
version 1.155, 2014/05/05 23:17:12
|
Line 160 sub get_posted_cgi {
|
Line 160 sub get_posted_cgi {
|
if (length($value) == 1) { |
if (length($value) == 1) { |
$value=~s/[\r\n]$//; |
$value=~s/[\r\n]$//; |
} |
} |
|
} elsif ($fname =~ /\.(xls|doc|ppt)x$/i) { |
|
$value=~s/[\r\n]$//; |
} |
} |
if (ref($fields) eq 'ARRAY') { |
if (ref($fields) eq 'ARRAY') { |
next if (!grep(/^\Q$name\E$/,@{$fields})); |
next if (!grep(/^\Q$name\E$/,@{$fields})); |
Line 365 sub sso_login {
|
Line 367 sub sso_login {
|
} |
} |
} |
} |
unless ($info{'symb'}) { |
unless ($info{'symb'}) { |
unless ($r->uri eq '/adm/roles') { |
unless (($r->uri eq '/adm/roles') || ($r->uri eq '/adm/sso')) { |
$info{'origurl'} = $r->uri; |
$info{'origurl'} = $r->uri; |
} |
} |
} |
} |
Line 384 sub sso_login {
|
Line 386 sub sso_login {
|
$r->set_handlers('PerlHandler'=> undef); |
$r->set_handlers('PerlHandler'=> undef); |
} |
} |
return OK; |
return OK; |
} elsif (defined($r->dir_config('lonSSOUserUnknownRedirect'))) { |
} else { |
&Apache::lonnet::logthis(" SSO authorized unknown user $user "); |
&Apache::lonnet::logthis(" SSO authorized unknown user $user "); |
$r->subprocess_env->set('SSOUserUnknown' => $user); |
|
$r->subprocess_env->set('SSOUserDomain' => $domain); |
|
my @cancreate; |
my @cancreate; |
my %domconfig = |
my %domconfig = |
&Apache::lonnet::get_dom('configuration',['usercreation'],$domain); |
&Apache::lonnet::get_dom('configuration',['usercreation'],$domain); |
Line 401 sub sso_login {
|
Line 401 sub sso_login {
|
} |
} |
} |
} |
} |
} |
if (grep(/^sso$/,@cancreate)) { |
if ((grep(/^sso$/,@cancreate)) || (defined($r->dir_config('lonSSOUserUnknownRedirect')))) { |
$r->internal_redirect('/adm/createaccount'); |
$r->subprocess_env->set('SSOUserUnknown' => $user); |
} else { |
$r->subprocess_env->set('SSOUserDomain' => $domain); |
$r->internal_redirect($r->dir_config('lonSSOUserUnknownRedirect')); |
if (grep(/^sso$/,@cancreate)) { |
|
$r->set_handlers('PerlHandler'=> [\&Apache::createaccount::handler]); |
|
$r->handler('perl-script'); |
|
} else { |
|
$r->internal_redirect($r->dir_config('lonSSOUserUnknownRedirect')); |
|
$r->set_handlers('PerlHandler'=> undef); |
|
} |
|
return OK; |
} |
} |
$r->set_handlers('PerlHandler'=> undef); |
|
return OK; |
|
} |
} |
return undef; |
return undef; |
} |
} |
Line 530 sub handler {
|
Line 535 sub handler {
|
if ($otherserver ne '') { |
if ($otherserver ne '') { |
$env{'form.otherserver'} = $otherserver; |
$env{'form.otherserver'} = $otherserver; |
} |
} |
|
unless (($env{'form.origurl'}) || ($r->uri eq '/adm/roles') || |
|
($r->uri eq '/adm/switchserver') || ($r->uri eq '/adm/sso')) { |
|
$env{'form.origurl'} = $r->uri; |
|
} |
} |
} |
|
|
# ---------------------------------------------------------------- Check access |
# ---------------------------------------------------------------- Check access |