dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7b992a
)
use makeTitleSafe()
author
Aaron Schulz
<aaron@users.mediawiki.org>
Wed, 13 Aug 2008 01:24:03 +0000
(
01:24
+0000)
committer
Aaron Schulz
<aaron@users.mediawiki.org>
Wed, 13 Aug 2008 01:24:03 +0000
(
01:24
+0000)
thumb.php
patch
|
blob
|
history
diff --git
a/thumb.php
b/thumb.php
index
24bd3d2
..
bb37e6e
100644
(file)
--- 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 );