about summary refs log tree commit homepage
path: root/lib/PublicInbox/ViewVCS.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-04-08 20:08:36 +0000
committerEric Wong <e@80x24.org>2023-04-08 20:12:27 +0000
commit6c7855038fdbbc204ab96a4a0fdbc7ed735216df (patch)
tree2c591b210d4b299a867c766a107d5b511944c08d /lib/PublicInbox/ViewVCS.pm
parente617216190c64754f7e95c3b386e6733e9b6e68c (diff)
downloadpublic-inbox-6c7855038fdbbc204ab96a4a0fdbc7ed735216df.tar.gz
This happens if somebody uses a bogus filename like `.' for the
`b=' parameter (e.g. GET `$REPO/$OID/?b=.').
Diffstat (limited to 'lib/PublicInbox/ViewVCS.pm')
-rw-r--r--lib/PublicInbox/ViewVCS.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm
index de8600ee..eb757089 100644
--- a/lib/PublicInbox/ViewVCS.pm
+++ b/lib/PublicInbox/ViewVCS.pm
@@ -514,7 +514,7 @@ sub solve_result {
         return show_other($ctx, $res) if $type ne 'blob';
         my $fn = $di->{path_b} // $hints->{path_b};
         my $paths = $ctx->{-paths} //= do {
-                my $path = to_filename($fn // 'blob');
+                my $path = to_filename($fn // 'blob') // 'blob';
                 my $raw_more = qq[(<a\nhref="$path">raw</a>)];
                 my @def;