version 1.115, 2012/06/04 19:23:41
|
version 1.116, 2012/10/29 17:38:55
|
Line 68 use File::Basename;
|
Line 68 use File::Basename;
|
use File::Copy; |
use File::Copy; |
use HTML::Entities(); |
use HTML::Entities(); |
use Apache::Constants qw(:common :http :methods); |
use Apache::Constants qw(:common :http :methods); |
use Apache::loncacc; |
|
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
Line 409 sub relativeDest {
|
Line 408 sub relativeDest {
|
while ($newfilename=~m{/\.\./}) { |
while ($newfilename=~m{/\.\./}) { |
$newfilename=~ s{/[^/]+/\.\./}{/}g; #remove dir/.. |
$newfilename=~ s{/[^/]+/\.\./}{/}g; #remove dir/.. |
} |
} |
my ($authorname,$authordom)=&Apache::loncacc::constructaccess($newfilename); |
my ($authorname,$authordom)=&Apache::lonnet::constructaccess($newfilename); |
unless (($authorname) && ($authordom)) { |
unless (($authorname) && ($authordom)) { |
my $otherdir = &display($newfilename); |
my $otherdir = &display($newfilename); |
$error = &mt('Access denied to [_1]',$otherdir); |
$error = &mt('Access denied to [_1]',$otherdir); |
Line 1442 sub handler {
|
Line 1441 sub handler {
|
|
|
# ----------------------------------------------------------- Start page output |
# ----------------------------------------------------------- Start page output |
|
|
my ($uname,$udom) = &Apache::loncacc::constructaccess($fn); |
my ($uname,$udom) = &Apache::lonnet::constructaccess($fn); |
&Debug($r, |
&Debug($r, |
"loncfile::handler constructaccess uname = $uname domain = $udom"); |
"loncfile::handler constructaccess uname = $uname domain = $udom"); |
if (($uname eq '') || ($udom eq '')) { |
if (($uname eq '') || ($udom eq '')) { |