Skip to content

Commit

Permalink
Item9140: correct template analysis; thanks Mikhail Ryazanov for spot…
Browse files Browse the repository at this point in the history
…ting this one

git-svn-id: http://svn.foswiki.org/trunk@7723 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Jun 11, 2010
1 parent 24bd704 commit eb3438f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions UnitTestContrib/test/unit/RobustnessTests.pm
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ sub verify {
Foswiki::Sandbox->sysCommand( 'sh -c %A%', A => 'echo urmf; exit 7' );
$this->assert( $exit != 0 );
$this->assert_str_equals( "urmf\n", $out );
( $out, $exit ) =
Foswiki::Sandbox->sysCommand( 'echo' );
$this->assert_equals( 0, $exit );
$this->assert_str_equals( `echo`, $out );
}

sub test_executeRSP {
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Sandbox.pm
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ sub sysCommand {
return '' unless $template;

# Implicit untaint OK; $template is safe
$template =~ /(^.*?)\s+(.*)$/;
$template =~ /^(.*?)(?:\s+(.*))?$/;
my $path = $1;
my $pTmpl = $2;
my $cmd;
Expand Down

0 comments on commit eb3438f

Please sign in to comment.