r77956 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77955‎ | r77956 | r77957 >
Date:03:21, 7 December 2010
Author:emufarmers
Status:reverted (Comments)
Tags:
Comment:
(bug 18372) $wgFileExtensions will now override $wgFileBlacklist
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/upload/UploadBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES
@@ -466,6 +466,7 @@
467467 show up as (struck-out) bluelinks instead of redlinks on Special:WantedFiles
468468 * rebuildFileCache.php no longer creates inappropriate cache files for redirects
469469 * (bug 23119) WikiError class and subclasses are now marked as deprecated
 470+* (bug 18372) $wgFileExtensions will now override $wgFileBlacklist
470471
471472 === API changes in 1.17 ===
472473 * (bug 22738) Allow filtering by action type on query=logevent.
Index: trunk/phase3/includes/upload/UploadBase.php
@@ -568,9 +568,10 @@
569569 if ( $this->mFinalExtension == '' ) {
570570 $this->mTitleError = self::FILETYPE_MISSING;
571571 return $this->mTitle = null;
572 - } elseif ( $this->checkFileExtensionList( $ext, $wgFileBlacklist ) ||
573 - ( $wgCheckFileExtensions && $wgStrictFileExtensions &&
574 - !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) ) {
 572+ } elseif ( ( $this->checkFileExtensionList( $ext, $wgFileBlacklist )
 573+ && !$this->checkFileExtensionList( $ext, $wgFileExtensions ) ) ||
 574+ ( $wgCheckFileExtensions && $wgStrictFileExtensions &&
 575+ !$this->checkFileExtension( $this->mFinalExtension, $wgFileExtensions ) ) ) {
575576 $this->mTitleError = self::FILETYPE_BADTYPE;
576577 return $this->mTitle = null;
577578 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r78285Follow-up to r77956: instead of making $wgFileExtensions override $wgFileBlac...emufarmers23:19, 12 December 2010
r79879Follow-up to r79719: remove RELEASE-NOTES entry left over from r77956 (which ...emufarmers05:08, 9 January 2011

Comments

#Comment by Platonides (talk | contribs)   13:38, 7 December 2010

I think bug 18372 should be fixed by changing the error message.

$wgFileExtensions overriding $wgFileBlacklist makes easier to shoot yourself in the foot.

#Comment by Werdna (talk | contribs)   00:52, 9 December 2010

It looks like you've fixed the bug correctly, but I'm not sure whether or not I agree with it. I think Platonides is right: we should change the error message to make it clear that the file type is blacklisted.

#Comment by Werdna (talk | contribs)   00:52, 9 December 2010

It looks like you've fixed the bug correctly, but I'm not sure whether or not I agree with it. I think Platonides is right: we should change the error message to make it clear that the file type is blacklisted.

#Comment by Catrope (talk | contribs)   16:15, 31 December 2010

Why was this tagged revert1.17?

#Comment by Platonides (talk | contribs)   16:47, 31 December 2010

We don't want this in 1.17, since r78285 changes the behavior again (look at the timing of adding the tag and r78285). I'd just merge r78285.

#Comment by Catrope (talk | contribs)   20:05, 31 December 2010

Marking as reverted since r78285 undoes all code changes in this rev.

Status & tagging log