diff options
author | Eric Wong <e@80x24.org> | 2021-11-22 18:38:09 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-11-22 21:36:50 +0000 |
commit | 10e0e2052b2c2a4bb405cfbb4c2c72464671152d (patch) | |
tree | 6cbb9322deeb41d5b1f2e86b07e07d0e37981e2e | |
parent | 74f027ca317067f7ae7289b15465d6a49078f65c (diff) | |
download | public-inbox-10e0e2052b2c2a4bb405cfbb4c2c72464671152d.tar.gz |
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.
-rw-r--r-- | lib/PublicInbox/LEI.pm | 3 |
1 files changed, 2 insertions, 1 deletions
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 |