From: Aaron Schulz Date: Wed, 13 Aug 2008 01:24:03 +0000 (+0000) Subject: use makeTitleSafe() X-Git-Tag: 1.31.0-rc.0~45930 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=2ba56500957eeb0f5f942cde6f49ed4e1ed27482;p=lhc%2Fweb%2Fwiklou.git use makeTitleSafe() --- diff --git a/thumb.php b/thumb.php index 24bd3d2de2..bb37e6e7a2 100644 --- a/thumb.php +++ b/thumb.php @@ -55,7 +55,11 @@ function wfThumbMain() { wfThumbError( 404, wfMsg( 'badtitletext' ) ); return; } - $title = Title::makeTitle( NS_IMAGE, $bits[1] ); + $title = Title::makeTitleSafe( NS_IMAGE, $bits[1] ); + if( is_null($title) ) { + wfThumbError( 404, wfMsg( 'badtitletext' ) ); + return; + } $img = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $title, $fileName ); } else { $img = wfLocalFile( $fileName );