Page MenuHomePhabricator

can't upload to file called '0'
Closed, ResolvedPublic

Description

Author: wonder

Description:
patch for SpecialUpload.php (revision 52760)

When the destination filename in Special:Upload is set to '0', it's considered to be unset, and the file is uploaded, using the filename of the source file as the destination filename. If the destination filename is '1', however, the wiki warns that the destination doesn't have an extension. This is because $this->mDesiredDestName is used as a boolean several times in SpecialUpload.php, where it would be more correct to test ($this->mDesiredDestName != ''), which flags both null and '' as empty values, but not '0'. This is a minor bug all right, but there it is. It's present in the newupload branch too.


Version: 1.16.x
Severity: minor

Attached:

Details

Reference
bz19509

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:43 PM
bzimport set Reference to bz19509.
bzimport added a subscriber: Unknown Object (MLST).