X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fmedia%2FDjVuHandler.php;h=3b904e84181bd624dfa4c79f8c45eaab44eb7321;hb=37895f28f4d07226c76919b13748c882a054ec52;hp=a0e7f2caee6bdeba81d68b9e2d4cc62d08a03c60;hpb=c7b0bb2459a6b14590b252935eccc2edfccae13b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/DjVuHandler.php b/includes/media/DjVuHandler.php index a0e7f2caee..3b904e8418 100644 --- a/includes/media/DjVuHandler.php +++ b/includes/media/DjVuHandler.php @@ -21,6 +21,7 @@ * @ingroup Media */ use MediaWiki\MediaWikiServices; +use MediaWiki\Shell\Shell; /** * Handler for DjVu images @@ -204,7 +205,7 @@ class DjVuHandler extends ImageHandler { # Use a subshell (brackets) to aggregate stderr from both pipeline commands # before redirecting it to the overall stdout. This works in both Linux and Windows XP. - $cmd = '(' . wfEscapeShellArg( + $cmd = '(' . Shell::escape( $wgDjvuRenderer, "-format=ppm", "-page={$page}", @@ -213,7 +214,7 @@ class DjVuHandler extends ImageHandler { if ( $wgDjvuPostProcessor ) { $cmd .= " | {$wgDjvuPostProcessor}"; } - $cmd .= ' > ' . wfEscapeShellArg( $dstPath ) . ') 2>&1'; + $cmd .= ' > ' . Shell::escape( $dstPath ) . ') 2>&1'; wfDebug( __METHOD__ . ": $cmd\n" ); $retval = ''; $err = wfShellExec( $cmd, $retval );