version 1.144, 2013/05/10 17:49:17
|
version 1.146, 2013/12/01 21:29:10
|
Line 89 store attempted access
|
Line 89 store attempted access
|
|
|
=head1 NOTABLE SUBROUTINES |
=head1 NOTABLE SUBROUTINES |
|
|
=over |
|
|
|
=cut |
=cut |
|
|
|
|
Line 230 sub get_posted_cgi {
|
Line 228 sub get_posted_cgi {
|
|
|
=pod |
=pod |
|
|
|
=over |
|
|
=item upload_size_allowed() |
=item upload_size_allowed() |
|
|
Perform size checks for file uploads to essayresponse items in course context. |
Perform size checks for file uploads to essayresponse items in course context. |
Line 287 sub sso_login {
|
Line 287 sub sso_login {
|
my $query = $r->args; |
my $query = $r->args; |
my %form; |
my %form; |
if ($query) { |
if ($query) { |
my @items = ('role','symb'); |
my @items = ('role','symb','iptoken'); |
&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 296 sub sso_login {
|
Line 296 sub sso_login {
|
} |
} |
} |
} |
|
|
|
my %sessiondata; |
|
if ($form{'iptoken'}) { |
|
%sessiondata = &Apache::lonnet::tmpget($form{'iptoken'}); |
|
my $delete = &Apache::lonnet::tmpdel($form{'token'}); |
|
} |
|
|
my $domain = $r->dir_config('lonSSOUserDomain'); |
my $domain = $r->dir_config('lonSSOUserDomain'); |
if ($domain eq '') { |
if ($domain eq '') { |
$domain = $r->dir_config('lonDefDomain'); |
$domain = $r->dir_config('lonDefDomain'); |
Line 303 sub sso_login {
|
Line 309 sub sso_login {
|
my $home=&Apache::lonnet::homeserver($user,$domain); |
my $home=&Apache::lonnet::homeserver($user,$domain); |
if ($home !~ /(con_lost|no_host|no_such_host)/) { |
if ($home !~ /(con_lost|no_host|no_such_host)/) { |
&Apache::lonnet::logthis(" SSO authorized user $user "); |
&Apache::lonnet::logthis(" SSO authorized user $user "); |
my ($is_balancer,$otherserver) = |
my ($is_balancer,$otherserver,$hosthere); |
&Apache::lonnet::check_loadbalancing($user,$domain); |
if ($form{'iptoken'}) { |
|
if (($sessiondata{'domain'} eq $form{'udom'}) && |
|
($sessiondata{'username'} eq $form{'uname'})) { |
|
$hosthere = 1; |
|
} |
|
} |
|
unless ($hosthere) { |
|
($is_balancer,$otherserver) = |
|
&Apache::lonnet::check_loadbalancing($user,$domain); |
|
} |
|
|
if ($is_balancer) { |
if ($is_balancer) { |
# login but immediately go to switch server to find us a new |
# login but immediately go to switch server to find us a new |
# machine |
# machine |
Line 477 sub handler {
|
Line 493 sub handler {
|
$checkexempt = 1; |
$checkexempt = 1; |
} |
} |
} |
} |
|
if ($env{'user.noloadbalance'} eq $r->dir_config('lonHostID')) { |
|
$checkexempt = 1; |
|
} |
unless ($checkexempt) { |
unless ($checkexempt) { |
($is_balancer,$otherserver) = |
($is_balancer,$otherserver) = |
&Apache::lonnet::check_loadbalancing($env{'user.name'}, |
&Apache::lonnet::check_loadbalancing($env{'user.name'}, |