Diff for /loncom/publisher/lonretrieve.pm between versions 1.12 and 1.14

version 1.12, 2001/05/24 21:43:05 version 1.14, 2001/08/20 13:18:41
Line 11 Line 11
 # 03/23 Guy Albertelli  # 03/23 Guy Albertelli
 # 03/24,03/29 Gerd Kortemeyer)  # 03/24,03/29 Gerd Kortemeyer)
 #  #
 # 03/31,04/03,05/02,05/09 Gerd Kortemeyer  # 03/31,04/03,05/02,05/09,06/23,08/20 Gerd Kortemeyer
   
 package Apache::lonretrieve;  package Apache::lonretrieve;
   
Line 139  sub handler { Line 139  sub handler {
   
   my $fn;    my $fn;
   
   
   # Get query string for limited number of parameters
   
       map {
          my ($name, $value) = split(/=/,$_);
          $value =~ tr/+/ /;
          $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
          if ($name eq 'filename') {
              unless ($ENV{'form.'.$name}) {
                 $ENV{'form.'.$name}=$value;
      }
          }
       } (split(/&/,$ENV{'QUERY_STRING'}));
   
   
   if ($ENV{'form.filename'}) {    if ($ENV{'form.filename'}) {
       $fn=$ENV{'form.filename'};        $fn=$ENV{'form.filename'};
       $fn=~s/^http\:\/\/[^\/]+//;        $fn=~s/^http\:\/\/[^\/]+//;
Line 158  sub handler { Line 173  sub handler {
   my $uname;    my $uname;
   my $udom;    my $udom;
   
   unless (($uname,$udom)=    ($uname,$udom)=
     &Apache::loncacc::constructaccess(      &Apache::loncacc::constructaccess($fn,$r->dir_config('lonDefDomain'));
              $fn,$r->dir_config('lonDefDomain'))) {    unless (($uname) && ($udom)) {
      $r->log_reason($uname.' at '.$udom.       $r->log_reason($uname.' at '.$udom.
          ' trying to publish file '.$ENV{'form.filename'}.           ' trying to publish file '.$ENV{'form.filename'}.
          ' ('.$fn.') - not authorized',            ' ('.$fn.') - not authorized', 

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


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