version 1.1, 2015/12/03 20:40:27
|
version 1.2, 2015/12/10 16:26:43
|
Line 41 use Apache::xml_to_loncapa;
|
Line 41 use Apache::xml_to_loncapa;
|
sub handler { |
sub handler { |
my $request = shift; |
my $request = shift; |
|
|
|
$request->content_type('text/plain'); |
|
|
my $path = $env{'form.path'}; # should be in the form "/daxeopen/priv/..." |
my $path = $env{'form.path'}; # should be in the form "/daxeopen/priv/..." |
$path =~ s/^\/daxeopen//; |
$path =~ s/^\/daxeopen//; |
|
|
Line 56 sub handler {
|
Line 58 sub handler {
|
} |
} |
} |
} |
unless ($allowed) { |
unless ($allowed) { |
$request->log_reason("Unauthorized path: $path", $path); |
$request->log_reason("Unauthorized path: $path", $path); |
return HTTP_NOT_ACCEPTABLE; |
$request->print("error\nUnauthorized path: $path"); |
|
$request->status(403); |
|
return OK; |
} |
} |
|
|
my $newpath = &Apache::lonnet::filelocation('', $path); |
my $newpath = &Apache::lonnet::filelocation('', $path); |