r38954 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38953‎ | r38954 | r38955 >
Date:21:35, 8 August 2008
Author:aaron
Status:old
Tags:
Comment:
use wfEscapeShellArg()
Modified paths:
  • /trunk/extensions/PhpHighlight/PhpHighlight.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PhpHighlight/PhpHighlight.php
@@ -45,7 +45,7 @@
4646 global $wgPhpPath;
4747 $file = tempnam( wfTempDir(), 'highlight-' );
4848 file_put_contents( $file, $text );
49 - $html = wfShellExec( "{$wgPhpPath} -s {$file}" );
 49+ $html = wfShellExec( wfEscapeShellArg($wgPhpPath)." -s ".wfEscapeShellArg($file) );
5050 unlink( $file );
5151 return str_replace( '<br />', "<br />\n", $html );
5252 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r38956Revert r38876 "(bug 2443) Add image name as alt-text when no caption is provi...brion21:50, 8 August 2008

Status & tagging log