Diff for /loncom/auth/lonracc.pm between versions 1.20 and 1.22

version 1.20, 2007/02/01 07:13:04 version 1.22, 2007/03/02 23:43:29
Line 39  sub subscribed { Line 39  sub subscribed {
   
     return 0 if (!-e "$filename.subscription");      return 0 if (!-e "$filename.subscription");
   
     my $hostname=$Apache::lonnet::hostname{$id};      my $hostname=&Apache::lonnet::hostname($id);
     my (undef,undef,undef,undef,$ip) = gethostbyname($hostname);      my (undef,undef,undef,undef,$ip) = gethostbyname($hostname);
           
     return 0 if (length($ip) != 4);      return 0 if (length($ip) != 4);
Line 65  sub handler { Line 65  sub handler {
     }      }
   
     my $reqhost = $r->get_remote_host(REMOTE_NOLOOKUP);      my $reqhost = $r->get_remote_host(REMOTE_NOLOOKUP);
     my %iphost=&Apache::lonnet::get_iphost();      my @hostids= &Apache::lonnet::get_hosts_from_ip($reqhost);
     my $hostids=$iphost{$reqhost};      if (!@hostids && $reqhost ne '127.0.0.1' ) {
     if (!$hostids && $reqhost ne '127.0.0.1' ) {  
  $r->log_reason("Unable to find a host for ".   $r->log_reason("Unable to find a host for ".
        $r->get_remote_host(REMOTE_NOLOOKUP));         $r->get_remote_host(REMOTE_NOLOOKUP));
  return FORBIDDEN;   return FORBIDDEN;
Line 78  sub handler { Line 77  sub handler {
     my $return;      my $return;
     my @ids;      my @ids;
   
     foreach my $id (@{$hostids}) {      foreach my $id (@hostids) {
  my $uri =$r->uri;   my $uri =$r->uri;
  if (($filename=~/\.meta$/) ||   if (($filename=~/\.meta$/) ||
     ($uri=~m|^/raw/uploaded|) ||      ($uri=~m|^/raw/uploaded|) ||

Removed from v.1.20  
changed lines
  Added in v.1.22


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