From d713c9103aaeffdcf47f5ce73e2c75dac4f1b76b Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 19 Mar 2025 17:12:37 +0100 Subject: only allow ten positional args --- test/exec.t | 1 + 1 file changed, 1 insertion(+) (limited to 'test/exec.t') diff --git a/test/exec.t b/test/exec.t index cc1be80..6757fc7 100755 --- a/test/exec.t +++ b/test/exec.t @@ -6,6 +6,7 @@ is(it::exec("echo gna"), "gna\n", "basic exec"); is(it::exec("echo {arg}", ['arg' => 'gnu'], ['arg' => "gna"]), "gna\n", "exec with argument"); is(it::exec("echo {0}", 'gna'), "gna\n", "exec with positional argument"); +is(it::shell_command("egrep a{10}"), 'egrep a{10}', "exec with too large positional argument"); is(it::shell_command("echo {arg}", ['arg' => 'gna07,-:blah']), "echo gna07,-:blah", "don't quote arguments with only whitelistes characters"); is(it::shell_command("echo {arg}", ['arg' => '2>&1']), "echo '2>&1'", "quote arguments with dangerous characters"); is(it::shell_command("echo {arg}", ['arg' => '']), "echo ''", "quote empty arguments"); -- cgit v1.2.3