Diff for /loncom/lontrans.pm between versions 1.12 and 1.14.10.1

version 1.12, 2006/08/17 20:22:11 version 1.14.10.1, 2020/03/05 22:02:32
Line 32  use strict; Line 32  use strict;
 use Apache::Constants qw(:common :remotehost);  use Apache::Constants qw(:common :remotehost);
 use Apache::lonnet();  use Apache::lonnet();
 use Apache::File();  use Apache::File();
 use lib '/home/httpd/lib/perl';  
 use LONCAPA;  use LONCAPA;
   
   
Line 50  sub handler { Line 49  sub handler {
  my @ids=&Apache::lonnet::current_machine_ids();   my @ids=&Apache::lonnet::current_machine_ids();
  foreach my $id (@ids) { if ($id eq $chome) { $allowed=1; } }   foreach my $id (@ids) { if ($id eq $chome) { $allowed=1; } }
  if ($allowed) {   if ($allowed) {
             $r->filename(&propath($udom,$uname).      $r->filename(&propath($udom,$uname).
                      '/userfiles/'.(join('/',@ufile)));   '/userfiles/'.(join('/',@ufile)));
         }          }
     } elsif ($r->uri=~m|^/~|) {          return OK;
  #internal authentication, needs fixup.      } elsif ($r->uri =~ m{^\Q/adm/wrapper/ext/https:/\E[^/]}) {
  my $fn = $r->uri(); # non users do not get the full path request          my $uri = $r->uri;
                  # through SCRIPT_FILENAME          $uri =~ s{^(\Q/adm/wrapper/ext/https:/\E)}{$1/};
  $fn=~s|^/~(\w+)|/home/$1/public_html|;          $r->uri($uri);
  $r->filename($fn);      }
     } else { return DECLINED; }      return DECLINED;
     return OK;  
 }  }
   
 1;  1;

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


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