Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -400,16 +400,19 @@ |
401 | 401 | } |
402 | 402 | $filtered = wfStripIllegalFilenameChars( $basename ); |
403 | 403 | |
| 404 | + /* Normalize to title form before we do any further processing */ |
404 | 405 | $nt = Title::makeTitleSafe( NS_FILE, $filtered ); |
405 | 406 | if( is_null( $nt ) ) { |
406 | 407 | $resultDetails = array( 'filtered' => $filtered ); |
407 | 408 | return self::ILLEGAL_FILENAME; |
408 | 409 | } |
| 410 | + $filtered = $nt->getDBkey(); |
| 411 | + |
409 | 412 | /** |
410 | 413 | * We'll want to blacklist against *any* 'extension', and use |
411 | 414 | * only the final one for the whitelist. |
412 | 415 | */ |
413 | | - list( $partname, $ext ) = $this->splitExtensions( $nt->getDBkey() ); |
| 416 | + list( $partname, $ext ) = $this->splitExtensions( $filtered ); |
414 | 417 | |
415 | 418 | if( count( $ext ) ) { |
416 | 419 | $finalExt = $ext[count( $ext ) - 1]; |