Index: trunk/phase3/thumb.php |
— | — | @@ -55,7 +55,11 @@ |
56 | 56 | wfThumbError( 404, wfMsg( 'badtitletext' ) ); |
57 | 57 | return; |
58 | 58 | } |
59 | | - $title = Title::makeTitle( NS_IMAGE, $bits[1] ); |
| 59 | + $title = Title::makeTitleSafe( NS_IMAGE, $bits[1] ); |
| 60 | + if( is_null($title) ) { |
| 61 | + wfThumbError( 404, wfMsg( 'badtitletext' ) ); |
| 62 | + return; |
| 63 | + } |
60 | 64 | $img = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $title, $fileName ); |
61 | 65 | } else { |
62 | 66 | $img = wfLocalFile( $fileName ); |