From: Eric Wong Date: Mon, 22 Nov 2021 18:38:09 +0000 (+0000) Subject: lei: always use 3-arg open perlop X-Git-Tag: v1.8.0~39 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=10e0e2052b2c2a4bb405cfbb4c2c72464671152d lei: always use 3-arg open perlop Future-proofing in case future versions of Perl warn on this, since 2-arg forms of open may be subject to injection vulnerabilities with non-literal args. --- diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 192f267c..4e0295fa 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -818,7 +818,8 @@ sub dispatch { next if $d eq ''; # same as git(1) chdir $d or return fail($self, "cd $d: $!"); } - open $self->{3}, '.' or return fail($self, "open . $!"); + open $self->{3}, '<', '.' or + return fail($self, "open . $!"); } $cb->($self, @argv); } elsif (grep(/\A-/, $cmd, @argv)) { # --help or -h only