version 1.126, 2009/07/23 17:40:29
|
version 1.130.6.1, 2011/11/18 22:41:02
|
Line 281 sub sso_login {
|
Line 281 sub sso_login {
|
my $query = $r->args; |
my $query = $r->args; |
my %form; |
my %form; |
if ($query) { |
if ($query) { |
foreach my $pair (split(/&/,$query)) { |
my @items = ('role','symb'); |
my ($name, $value) = split(/=/,$pair); |
&Apache::loncommon::get_unprocessed_cgi($query,\@items); |
$name = &unescape($name); |
foreach my $item (@items) { |
if (($name eq 'role') || ($name eq 'symb')) { |
if (defined($env{'form.'.$item})) { |
$value =~ tr/+/ /; |
$form{$item} = $env{'form.'.$item}; |
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; |
|
$form{$name} = $value; |
|
} |
} |
} |
} |
} |
} |
Line 299 sub sso_login {
|
Line 297 sub sso_login {
|
if ($r->dir_config("lonBalancer") eq 'yes') { |
if ($r->dir_config("lonBalancer") eq 'yes') { |
# login but immeaditly go to switch server to find us a new |
# login but immeaditly go to switch server to find us a new |
# machine |
# machine |
&Apache::lonauth::success($r,$user,$domain,$home,'noredirect','',\%form); |
&Apache::lonauth::success($r,$user,$domain,$home,'noredirect'); |
$env{'request.sso.login'} = 1; |
$env{'request.sso.login'} = 1; |
if (defined($r->dir_config("lonSSOReloginServer"))) { |
if (defined($r->dir_config("lonSSOReloginServer"))) { |
$env{'request.sso.reloginserver'} = |
$env{'request.sso.reloginserver'} = |
Line 413 sub handler {
|
Line 411 sub handler {
|
} |
} |
$env{'request.filename'} = $r->filename; |
$env{'request.filename'} = $r->filename; |
$env{'request.noversionuri'} = &Apache::lonnet::deversion($requrl); |
$env{'request.noversionuri'} = &Apache::lonnet::deversion($requrl); |
|
if ($requrl =~ m{^/adm/wrapper/ext/}) { |
|
my $query = $r->args; |
|
if ($query) { |
|
my $preserved; |
|
foreach my $pair (split(/&/,$query)) { |
|
my ($name, $value) = split(/=/,$pair); |
|
unless (($name eq 'symb') || ($name eq 'wrapperdisplay')) { |
|
$preserved .= $pair.'&'; |
|
} |
|
} |
|
$preserved =~ s/\&$//; |
|
if ($preserved) { |
|
$env{'request.external.querystring'} = $preserved; |
|
} |
|
} |
|
} |
# -------------------------------------------------------- Load POST parameters |
# -------------------------------------------------------- Load POST parameters |
|
|
&Apache::lonacc::get_posted_cgi($r); |
&Apache::lonacc::get_posted_cgi($r); |
Line 435 sub handler {
|
Line 449 sub handler {
|
return OK; |
return OK; |
} |
} |
if (($access ne '2') && ($access ne 'F')) { |
if (($access ne '2') && ($access ne 'F')) { |
$env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; |
if ($requrl =~ m{^/res/}) { |
return HTTP_NOT_ACCEPTABLE; |
$access = &Apache::lonnet::allowed('bro',$requrl); |
|
if ($access ne 'F') { |
|
$env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; |
|
return HTTP_NOT_ACCEPTABLE; |
|
} |
|
} else { |
|
$env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; |
|
return HTTP_NOT_ACCEPTABLE; |
|
} |
} |
} |
} |
} |
if ($requrl =~ m|^/prtspool/|) { |
if ($requrl =~ m|^/prtspool/|) { |
Line 459 sub handler {
|
Line 481 sub handler {
|
$env{'user.domain'} eq 'public' && |
$env{'user.domain'} eq 'public' && |
$requrl !~ m{^/+(res|public|uploaded)/} && |
$requrl !~ m{^/+(res|public|uploaded)/} && |
$requrl !~ m{^/adm/[^/]+/[^/]+/aboutme/portfolio$ }x && |
$requrl !~ m{^/adm/[^/]+/[^/]+/aboutme/portfolio$ }x && |
|
$requrl !~ m{^/adm/blockingstatus/.*$} && |
$requrl !~ m{^/+adm/(help|logout|restrictedaccess|randomlabel\.png)}) { |
$requrl !~ m{^/+adm/(help|logout|restrictedaccess|randomlabel\.png)}) { |
$env{'request.querystring'}=$r->args; |
$env{'request.querystring'}=$r->args; |
$env{'request.firsturl'}=$requrl; |
$env{'request.firsturl'}=$requrl; |
Line 466 sub handler {
|
Line 489 sub handler {
|
} |
} |
# ------------------------------------------------------------- This is allowed |
# ------------------------------------------------------------- This is allowed |
if ($env{'request.course.id'}) { |
if ($env{'request.course.id'}) { |
&Apache::lonnet::countacc($requrl); |
my $skiplogging; |
|
if ((!&Apache::loncommon::needs_gci_custom()) && |
|
($env{'course.'.$env{'request.course.id'}.'.internal.courseowner'} ne $env{'user.name'}.':'.$env{'user.domain'})) { |
|
$skiplogging = 1; |
|
} |
|
unless ($skiplogging) { |
|
&Apache::lonnet::countacc($requrl); |
|
} |
$requrl=~/\.(\w+)$/; |
$requrl=~/\.(\w+)$/; |
my $query=$r->args; |
my $query=$r->args; |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
Line 517 sub handler {
|
Line 547 sub handler {
|
} |
} |
} |
} |
$env{'request.symb'}=$symb; |
$env{'request.symb'}=$symb; |
&Apache::lonnet::courseacclog($symb); |
unless ($skiplogging) { |
|
&Apache::lonnet::courseacclog($symb); |
|
} |
} else { |
} else { |
# ------------------------------------------------------- This is other content |
# ------------------------------------------------------- This is other content |
&Apache::lonnet::courseacclog($requrl); |
unless ($skiplogging) { |
|
&Apache::lonnet::courseacclog($requrl); |
|
} |
} |
} |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};; |