Diff for /loncom/lonhttpd between versions 1.10 and 1.12

version 1.10, 2005/02/14 00:18:03 version 1.12, 2007/04/11 19:52:44
Line 12  $VERSION = "1.3.2 (Demonic/Linux/LON-CAP Line 12  $VERSION = "1.3.2 (Demonic/Linux/LON-CAP
   
 use lib '/home/httpd/lib/perl/';  use lib '/home/httpd/lib/perl/';
 use LONCAPA::Configuration();  use LONCAPA::Configuration();
   use Apache::lonnet;
 %loncapavar=%{&LONCAPA::Configuration::read_conf('loncapa.conf')};  %loncapavar=%{&LONCAPA::Configuration::read_conf('loncapa.conf')};
 $port_to_use=$loncapavar{'lonhttpdPort'};  $port_to_use=$loncapavar{'lonhttpdPort'};
 if (!defined($port_to_use)) {  if (!defined($port_to_use)) {
Line 51  if ($port_to_use eq '80') { die('Apache Line 52  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 350  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\/([^\/]+)\/\1\-domainconfig\/(logo|domlogo|img)\/[^\/]+$/) {
               if (&Apache::lonnet::domain($1) ne '') {
                   $fail = 0;
               }
           }
   
 #  #
 # because existing restriction matrix would not do precedence across rules  # because existing restriction matrix would not do precedence across rules
 #  #

Removed from v.1.10  
changed lines
  Added in v.1.12


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>