--- loncom/auth/lontokacc.pm 2005/02/05 22:20:56 1.11 +++ loncom/auth/lontokacc.pm 2005/02/06 07:23:40 1.12 @@ -1,7 +1,7 @@ # The LearningOnline Network # Access Handler for User File Transfers # -# $Id: lontokacc.pm,v 1.11 2005/02/05 22:20:56 albertel Exp $ +# $Id: lontokacc.pm,v 1.12 2005/02/06 07:23:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,7 +36,13 @@ use Apache::File(); sub handler { 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) { + $r->log_reason("Unable to do hostname $reqhost lookup for ".$r->get_remote_host(REMOTE_NOLOOKUP)); + return FORBIDDEN; + } if ($reqhost eq 'localhost.localdomain') { return OK; }