dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db11362
)
Use wfShellExec in parserTest.inc
author
umherirrender
<umherirrender_de.wp@web.de>
Fri, 26 Apr 2013 15:45:18 +0000
(17:45 +0200)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Sat, 27 Apr 2013 08:12:21 +0000
(08:12 +0000)
This avoids shell execution with backticks
Change-Id: Ib0db0c2ac36ae615f280ed9db82d2ca6aad744b5
tests/parser/parserTest.inc
patch
|
blob
|
history
diff --git
a/tests/parser/parserTest.inc
b/tests/parser/parserTest.inc
index
7c8daf2
..
a0ede09
100644
(file)
--- a/
tests/parser/parserTest.inc
+++ b/
tests/parser/parserTest.inc
@@
-1174,9
+1174,10
@@
class ParserTest {
global $wgDiff3;
// we assume that people with diff3 also have usual diff
- $diff = ( wfIsWindows() && !$wgDiff3 )
- ? `fc $shellInfile $shellOutfile`
- : `diff -au $shellInfile $shellOutfile`;
+ $shellCommand = ( wfIsWindows() && !$wgDiff3 ) ? 'fc' : 'diff -au';
+
+ $diff = wfShellExec( "$shellCommand $shellInfile $shellOutfile" );
+
unlink( $infile );
unlink( $outfile );