about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
authorEric Wong <e@80x24.org>2021-11-10 10:28:37 +0000
committerEric Wong <e@80x24.org>2021-11-10 18:38:16 +0000
commit7eeeea81c74c7184984510892871fd79406c0393 (patch)
tree24de6c6f01281e374e5785c3b26550b3452cc855 /lib/PublicInbox
parent1fb061098abd9a9ad8f018b0583071e19ffc9fec (diff)
I don't expect this to be hit in real-world use via normal
interactive shells.  However, somebody could accidentally add
"\n" in languages (e.g. Perl, C) where it's easy to pass "\n"
in argv[].
Diffstat (limited to 'lib/PublicInbox')
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm
index 352ee601..51ee3d9c 100644
--- a/lib/PublicInbox/LeiQuery.pm
+++ b/lib/PublicInbox/LeiQuery.pm
@@ -141,6 +141,7 @@ no query allowed on command-line with --stdin
                 PublicInbox::InputPipe::consume($self->{0}, \&qstr_add, $self);
+        chomp(@argv) and $self->qerr("# trailing `\\n' removed");
         $mset_opt{q_raw} = [ @argv ]; # copy
         $mset_opt{qstr} =
                 $self->{lse}->query_argv_to_string($self->{lse}->git, \@argv);