From 91b43d220b1268b6bc956dbb4eed5c2195b6ed28 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Fri, 16 Oct 2020 12:49:47 +0200 Subject: [PATCH] Fix attempts to resolve man pages without name A bot triggered 'GET /.env', resulting in a lookup on section='env' but no name. Slow and useless... --- www/index.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/index.pl b/www/index.pl index 7be242e..1259f33 100755 --- a/www/index.pl +++ b/www/index.pl @@ -1056,7 +1056,7 @@ sub dbManPrefName { my $man = $s->dbManPref(%o, name => $name); return ($man, '') if $man; - return (undef, '') if $name !~ s/\.([^.]+)$//; + return (undef, '') if $name !~ s/\.([^.]+)$// || !length $name; my $section = $1; $man = $s->dbManPref(%o, name => $name, section => $section); return ($man, $section) if $man;