Page MenuHomePhabricator

cleanupImages.php should enforce same file naming rules as UploadBase
Open, LowPublicFeature

Description

Currently, the maintenance/cleanupImages.php script will happily move files to names that would not be permitted for new uploads. Most glaringly, the current implementation of ImageCleanup::buildSafeTitle() may deliberately insert backslashes into file names, even though wfBaseName(), as called from UploadBase::getTitle() via wfStripIllegalFilenameChars(), explicitly says that "we don't want \s in our [...] paths".


Version: 1.24rc
Severity: enhancement

Details

Reference
bz16876

Event Timeline

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

Confirming that ./includes/upload/UploadBase.php calls wfStripIllegalFilenameChars while ./maintenance/cleanupImages.php does not.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM
Aklapper removed a subscriber: wikibugs-l-list.