Fix for r74950: use wfEscapeShellArg()
authorMax Semenik <maxsem@users.mediawiki.org>
Fri, 12 Nov 2010 18:47:33 +0000 (18:47 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Fri, 12 Nov 2010 18:47:33 +0000 (18:47 +0000)
includes/installer/Installer.php

index 86444a5..c575b15 100644 (file)
@@ -890,10 +890,7 @@ abstract class Installer {
                                        return $command;
                                }
 
-                               if ( wfIsWindows() ) {
-                                       $command = "\"$command\"";
-                               }
-                               $file = str_replace( '$1', $command, $versionInfo[0] );
+                               $file = str_replace( '$1', wfEscapeShellArg( $command ), $versionInfo[0] );
                                if ( strstr( wfShellExec( $file ), $versionInfo[1] ) !== false ) {
                                        return $command;
                                }