version 1.10, 2005/02/14 00:18:03
|
version 1.15, 2007/07/11 18:48:20
|
Line 51 if ($port_to_use eq '80') { die('Apache
|
Line 51 if ($port_to_use eq '80') { die('Apache
|
"mpeg" => "video/mpeg", |
"mpeg" => "video/mpeg", |
"mpg" => "video/mpeg", |
"mpg" => "video/mpeg", |
"jpeg" => "image/jpeg", |
"jpeg" => "image/jpeg", |
"jpg" => "image/jpeg"); |
"jpg" => "image/jpeg", |
|
"png" => "image/png"); |
|
|
$logfile = "/home/httpd/perl/logs/lonhttpd.log"; |
$logfile = "/home/httpd/perl/logs/lonhttpd.log"; |
|
|
Line 348 while (<STDIN>) {
|
Line 349 while (<STDIN>) {
|
1 while $address =~ s#/\.(/|$)#\1#; |
1 while $address =~ s#/\.(/|$)#\1#; |
1 while $address =~ s#/[^/]*/\.\.(/|$)#\1#; |
1 while $address =~ s#/[^/]*/\.\.(/|$)#\1#; |
1 while $address =~ s#^/\.\.(/|$)#\1#; |
1 while $address =~ s#^/\.\.(/|$)#\1#; |
$fail = 0; |
$fail = 1; |
# |
# |
# Heavily customized for LON-CAPA |
# Heavily customized for LON-CAPA |
# |
# |
$address=~s/\/+/\//g; |
$address=~s/\/+/\//g; |
unless ($address=~/^\/(status|adm\/|res\/adm\/)/) { $fail=1; } |
if ($address=~/^\/(status|adm\/|res\/adm\/)/) { |
|
$fail = 0; |
|
} elsif ($address =~ /^\/res\/([\w\.\-]+)\/\1\-domainconfig\/(logo|domlogo|img)\/[^\/]+$/) { |
|
$fail = 0; |
|
} |
# |
# |
# because existing restriction matrix would not do precedence across rules |
# because existing restriction matrix would not do precedence across rules |
# |
# |
Line 590 for (;;) {
|
Line 595 for (;;) {
|
waitpid($pid, 0); |
waitpid($pid, 0); |
$0 = "lonhttpd: (dhttpi) on ANY:$port_to_use, last request " . |
$0 = "lonhttpd: (dhttpi) on ANY:$port_to_use, last request " . |
scalar localtime; |
scalar localtime; |
|
close(NS); |
} else { |
} else { |
$0 = "lonhttpd: (dhttpi) child switching to socket"; |
$0 = "lonhttpd: (dhttpi) child switching to socket"; |
open(STDIN, "<&NS"); |
open(STDIN, "<&NS"); |