--- loncom/auth/lontokacc.pm 2002/08/08 13:45:21 1.6 +++ loncom/auth/lontokacc.pm 2002/10/21 19:15:10 1.7 @@ -1,7 +1,7 @@ # The LearningOnline Network # Access Handler for User File Transfers # -# $Id: lontokacc.pm,v 1.6 2002/08/08 13:45:21 www Exp $ +# $Id: lontokacc.pm,v 1.7 2002/10/21 19:15:10 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -32,13 +32,17 @@ use strict; use Apache::Constants qw(:common :remotehost); use Apache::lonnet(); use Apache::File(); +use Data::Dumper; sub handler { my $r = shift; - my $reqhost; - unless ($reqhost=$r->get_remote_host(REMOTE_DOUBLE_REV)) { - $r->log_reason("Spoof request ".$reqhost); - return FORBIDDEN; + my $reqhost = $r->get_remote_host(REMOTE_DOUBLE_REV); + if (!$reqhost && $r->get_remote_host(REMOTE_NOLOOKUP) eq $r->get_server_name()) { + $reqhost = $r->get_server_name(); + } + unless ($reqhost) { + $r->log_reason("Spoof request from ". $reqhost); + return FORBIDDEN; } if ($reqhost eq 'localhost.localdomain') { $r->register_cleanup(\&removefile);