diff options
author | Eric Wong <e@80x24.org> | 2019-11-04 11:13:47 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-11-04 18:33:25 +0000 |
commit | 600e3a464823b3f460a80723a8ea3525fe841285 (patch) | |
tree | 56203f59c6b12ad4af1f7d3e5cde36d06356e4b2 /t/plack.t | |
parent | b5318c127af37e330e4ba059817425a596a27647 (diff) | |
download | public-inbox-600e3a464823b3f460a80723a8ea3525fe841285.tar.gz |
It's possible (but unlikely) a user will put spaces in TMPDIR and cause File::Temp::tempdir() to return a temporary directory with spaces in the filename, making it unsafe for shell expansion. PublicInbox::Git didn't exist when t/mda.t was written, and I just forgot about PublicInbox::Git->qx for t/plack.t :x
Diffstat (limited to 't/plack.t')
-rw-r--r-- | t/plack.t | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -54,9 +54,9 @@ EOF my $im = PublicInbox::Import->new($git, 'test', $addr); $im->add($mime); $im->done; - my $rev = `git --git-dir="$maindir" rev-list HEAD`; + my $rev = $git->qx(qw(rev-list HEAD)); like($rev, qr/\A[a-f0-9]{40}/, "good revision committed"); - @ls = `git --git-dir="$maindir" ls-tree -r --name-only HEAD`; + @ls = $git->qx(qw(ls-tree -r --name-only HEAD)); chomp @ls; } my $app = eval { |