version 1.159.2.7, 2019/07/31 17:42:29
|
version 1.168, 2017/12/21 22:06:44
|
Line 202 sub get_posted_cgi {
|
Line 202 sub get_posted_cgi {
|
$fname=''; |
$fname=''; |
$fmime=''; |
$fmime=''; |
} |
} |
|
if ($i<$#lines && $lines[$i+1]=~/^Content\-Type\:\s*([\w\-\/]+)/i) { |
|
# TODO: something with $1 ! |
|
$i++; |
|
} |
|
if ($i<$#lines && $lines[$i+1]=~/^Content\-transfer\-encoding\:\s*([\w\-\/]+)/i) { |
|
# TODO: something with $1 ! |
|
$i++; |
|
} |
$i++; |
$i++; |
} |
} |
} else { |
} else { |
Line 281 sub upload_size_allowed {
|
Line 289 sub upload_size_allowed {
|
sub sso_login { |
sub sso_login { |
my ($r,$handle,$username) = @_; |
my ($r,$handle,$username) = @_; |
|
|
|
my $lonidsdir=$r->dir_config('lonIDsDir'); |
if (($r->user eq '') || ($username ne '') || ($r->user eq 'public:public') || |
if (($r->user eq '') || ($username ne '') || ($r->user eq 'public:public') || |
(defined($env{'user.name'}) && (defined($env{'user.domain'})) |
(defined($env{'user.name'}) && (defined($env{'user.domain'})) |
&& ($handle ne ''))) { |
&& ($handle ne ''))) { |
Line 365 sub sso_login {
|
Line 374 sub sso_login {
|
} else { |
} else { |
# need to login them in, so generate the need data that |
# need to login them in, so generate the need data that |
# migrate expects to do login |
# migrate expects to do login |
my $ip = $r->get_remote_host(); |
my $ip = $r->get_remote_host(); |
my %info=('ip' => $ip, |
my %info=('ip' => $ip, |
'domain' => $domain, |
'domain' => $domain, |
'username' => $user, |
'username' => $user, |
Line 497 sub handler {
|
Line 506 sub handler {
|
my $preserved; |
my $preserved; |
foreach my $pair (split(/&/,$query)) { |
foreach my $pair (split(/&/,$query)) { |
my ($name, $value) = split(/=/,$pair); |
my ($name, $value) = split(/=/,$pair); |
unless (($name eq 'symb') || ($name eq 'usehttp')) { |
unless ($name eq 'symb') { |
$preserved .= $pair.'&'; |
$preserved .= $pair.'&'; |
} |
} |
if (($env{'request.course.id'}) && ($name eq 'folderpath')) { |
if (($env{'request.course.id'}) && ($name eq 'folderpath')) { |
Line 516 sub handler {
|
Line 525 sub handler {
|
} |
} |
} elsif ($env{'request.course.id'} && |
} elsif ($env{'request.course.id'} && |
(($requrl =~ m{^/adm/$match_domain/$match_username/aboutme$}) || |
(($requrl =~ m{^/adm/$match_domain/$match_username/aboutme$}) || |
($requrl =~ m{^/public/$cdom/$cnum/syllabus$}))) { |
($requrl eq "/public/$cdom/$cnum/syllabus") || |
|
($requrl =~ m{^/adm/$cdom/$cnum/\d+/ext\.tool$}))) { |
my $query = $r->args; |
my $query = $r->args; |
if ($query) { |
if ($query) { |
foreach my $pair (split(/&/,$query)) { |
foreach my $pair (split(/&/,$query)) { |
Line 664 sub handler {
|
Line 674 sub handler {
|
($requrl=~m|\.problem/smpedit$|) || |
($requrl=~m|\.problem/smpedit$|) || |
($requrl=~/^\/public\/.*\/syllabus$/) || |
($requrl=~/^\/public\/.*\/syllabus$/) || |
($requrl=~/^\/adm\/(viewclasslist|navmaps)$/) || |
($requrl=~/^\/adm\/(viewclasslist|navmaps)$/) || |
($requrl=~/^\/adm\/.*\/aboutme\/portfolio(\?|$)/)) { |
($requrl=~/^\/adm\/.*\/aboutme\/portfolio(\?|$)/) || |
|
($requrl=~m{^/adm/$cdom/$cnum/\d+/ext\.tool$})) { |
# ------------------------------------- This is serious stuff, get symb and log |
# ------------------------------------- This is serious stuff, get symb and log |
my $symb; |
my $symb; |
if ($query) { |
if ($query) { |
Line 759 sub handler {
|
Line 770 sub handler {
|
# ------------------------------------ See if this is a viewable portfolio file |
# ------------------------------------ See if this is a viewable portfolio file |
if (&Apache::lonnet::is_portfolio_url($requrl)) { |
if (&Apache::lonnet::is_portfolio_url($requrl)) { |
my $clientip = $r->get_remote_host(); |
my $clientip = $r->get_remote_host(); |
my $access=&Apache::lonnet::allowed('bre',$requrl,undef,undef,$clientip); |
my $access=&Apache::lonnet::allowed('bre',$requrl,undef,undef,$clientip); |
if ($access eq 'A') { |
if ($access eq 'A') { |
&Apache::restrictedaccess::setup_handler($r); |
&Apache::restrictedaccess::setup_handler($r); |
return OK; |
return OK; |