use CGI;
use Lock;
local $main::highlander = Get Lock(
lock_file => "highlander",
timeout_limit => 10;
);
unless ($main::highlander) {
my $host = $ENV{REMOTE_HOST};
$host = $ENV{REMOTE_ADDR} unless defined $host;
warn "$0 @ ".(localtime).": highlander abort for $host after 10 se
+conds\n";
print CGI::header(-status => 503,
-retry_after => 30,
-type => 'text/plain'),
"Our server is overloaded. Please try again i
+n a few minutes.\n";
exit 0;
}
# No further logic required for mod_perl!!!
But I will definitely make the fix now that you have shown me
that this really is a security hole and not merely a portability issue
as I had thought. |