summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-10-16 12:49:47 +0200
committerYorhel <git@yorhel.nl>2020-10-16 12:49:49 +0200
commit91b43d220b1268b6bc956dbb4eed5c2195b6ed28 (patch)
tree52cf3e982886db2cba52091d37eda7e9ec794d0c
parenteecc8e798cc89cdb5ba884efdbe87b5dd587d207 (diff)
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...
-rwxr-xr-xwww/index.pl2
1 files changed, 1 insertions, 1 deletions
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;