Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/165679
Change subject: Remove duplicate param escaping code ...................................................................... Remove duplicate param escaping code wfEscapeShellArg() can handle multiple params, escaping each. This patch changes wfShellExec() to call wfEscapeShellArg() directly instead of doing the gluing itself. Change-Id: I7a0761cc2ba98c210a9eacadd12da407d933e42a --- M includes/GlobalFunctions.php 1 file changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/79/165679/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 2c26fef..1aa936c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2796,11 +2796,7 @@ } if ( is_array( $cmd ) ) { // Command line may be given as an array, escape each value and glue them together with a space - $cmdVals = array(); - foreach ( $cmd as $val ) { - $cmdVals[] = wfEscapeShellArg( $val ); - } - $cmd = implode( ' ', $cmdVals ); + $cmd = call_user_func_array( 'wfEscapeShellArg', $cmd ); } $cmd = $envcmd . $cmd; -- To view, visit https://gerrit.wikimedia.org/r/165679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a0761cc2ba98c210a9eacadd12da407d933e42a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Yurik <yu...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits