Diff for /loncom/auth/lonracc.pm between versions 1.14 and 1.15

version 1.14, 2005/02/05 22:20:56 version 1.15, 2005/02/06 07:23:40
Line 52  sub subscribed { Line 52  sub subscribed {
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
     my $reqhost = $r->get_remote_host(REMOTE_HOST);      my $reqhost = $r->get_remote_host(REMOTE_NOLOOKUP);
       my $netaddr=inet_aton($reqhost);
       ($reqhost) = gethostbyaddr($netaddr,AF_INET);
     if (!$reqhost) {      if (!$reqhost) {
  $r->log_reason("Unable to do hostname lookup for ".$ENV{'REMOTE_ADDR'});   $r->log_reason("Unable to do hostname $reqhost lookup for ".$r->get_remote_host(REMOTE_NOLOOKUP));
    return FORBIDDEN;
     }      }
     if ($reqhost eq 'localhost.localdomain') {      if ($reqhost eq 'localhost.localdomain') {
  return OK;   return OK;
Line 63  sub handler { Line 66  sub handler {
     my @ids=();      my @ids=();
     my $id;      my $id;
     foreach $id (keys %Apache::lonnet::hostname) {      foreach $id (keys %Apache::lonnet::hostname) {
  if ($Apache::lonnet::hostname{$id} =~ /\Q$reqhost\E/i) {   if ($Apache::lonnet::hostname{$id} =~ /^\Q$reqhost\E$/i) {
     my $filename=$r->filename;      my $filename=$r->filename;
     my $uri =$r->uri;      my $uri =$r->uri;
     if ((-e "$filename.$id") ||      if ((-e "$filename.$id") ||

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


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