diff options
author | Eric Wong <e@80x24.org> | 2024-02-12 13:13:50 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2024-02-13 07:32:40 +0000 |
commit | c22d8d2b3fa6403882dfe9c4e63d0aae86620f58 (patch) | |
tree | f23f81a394449fe1dd33297fb39bd0137b035f21 | |
parent | 0723e95413ba505539ffb786851bb1c0455d32dd (diff) | |
download | public-inbox-c22d8d2b3fa6403882dfe9c4e63d0aae86620f58.tar.gz |
The "patch is too large to show" text is now broken by an <hr> to prevent it from being confused as part of a commit message (or having somebody intentionally insert that text in a commit message to confuse readers). A missing </pre> is also necessary before the <hr> tag for the related commit search form.
-rw-r--r-- | lib/PublicInbox/ViewVCS.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 2a305303..61329db6 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -274,7 +274,7 @@ EOM undef $bdy; # free memory my $fh = delete $ctx->{patch_fh}; if (-s $fh > $MAX_SIZE) { - print $zfh "---\n patch is too large to show\n"; + print $zfh '</pre><hr><pre>patch is too large to show</pre>'; } else { # prepare flush_diff: seek $fh, 0, SEEK_SET; PublicInbox::IO::read_all $fh, -s _, \$x; @@ -312,7 +312,7 @@ EOM $alt = ''; } print $zfh <<EOM; -<hr><form action="$ibx_url" +</pre><hr><form action="$ibx_url" id=related><pre>find related emails, including ancestors/descendants/conflicts <textarea name=q cols=${\PublicInbox::View::COLS} rows=$rows>$q</textarea> <input type=submit value="search$alt" |