Page MenuHomePhabricator

importImages.php does not run input file names through UTF8 normalization functions
Closed, ResolvedPublic

Description

-rw-r--r--   1 reedy wikidev 159935541 Dec  9 20:39 Nova Guinea - résultats de l'expédition scientifique néerlandaise à la Nouvelle-Guinée en 1903 - Vol 4.djvu
-rw-r--r--   1 reedy wikidev      1214 Dec  9 20:39 Nova Guinea - résultats de l'expédition scientifique néerlandaise à la Nouvelle-Guinée en 1903 - Vol 4.txt

Shows on https://commons.wikimedia.org/wiki/Special:ListFiles?limit=50&user=Spinster&ilshowall=1

https://commons.wikimedia.org/wiki/File:Nova_Guinea_-_re%CC%81sultats_de_l%27expe%CC%81dition_scientifique_ne%CC%81erlandaise_a%CC%80_la_Nouvelle-Guine%CC%81e_en_1903_-_Vol_4.djvu says it doesn't exist.

I can't move it (T78059).

I can't delete it.

reedy@tin:/tmp/uploads$ mwscript deleteBatch.php --wiki=commonswiki --u="Reedy (WMF)" --r="Bad filename" move.txt
Skipping nonexistent page 'File:Nova Guinea - résultats de l'expédition scientifique néerlandaise à la Nouvelle-Guinée en 1903 - Vol 4.djvu'
reedy@tin:/tmp/uploads$

It seemingly only exists in ListFiles

Event Timeline

Reedy created this task.Dec 9 2014, 9:11 PM
Reedy updated the task description. (Show Details)
Reedy raised the priority of this task from to Needs Triage.
Reedy changed Security from none to None.
Reedy updated the task description. (Show Details)
Reedy added a subscriber: Reedy.
Reedy added a comment.Dec 9 2014, 9:27 PM

Deleted with a hacked script

reedy@tin:/srv/mediawiki-staging/php-1.25wmf11/maintenance$ mwscript deleteOne.php --wiki=commonswiki --u="Reedy (WMF)" --r="Bad filename" /tmp/uploads/delete.txt
File:Nova Guinea - résultats de l'expédition scientifique néerlandaise à la Nouvelle-Guinée en 1903 - Vol 4.djvu Deleted!
reedy@tin:/srv/mediawiki-staging/php-1.25wmf11/maintenance$
Aklapper triaged this task as Normal priority.Dec 10 2014, 11:55 AM
Bawolff renamed this task from importImages.php lets you upload a file with an inaccessible name to importImages.php does not run input file names through UTF8 normalization functions.Jul 10 2015, 1:15 PM
Bawolff added a project: good first bug.
Restricted Application added a subscriber: Matanya. · View Herald TranscriptJul 10 2015, 1:15 PM

Marking this as easy, all that really needs to be done is to run the file name through Utf8Normal::cleanUp or whatever the method is called to make sure that all input file names are in NFC before creating the wiki page name.

Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:27 PM

Change 263153 had a related patch set uploaded (by Ananay):
importImages.php runs input file names through UTF8 normalization functions

https://gerrit.wikimedia.org/r/263153

Change 263153 merged by jenkins-bot:
importImages.php: Run input file names through UTF8 normalization

https://gerrit.wikimedia.org/r/263153

ananayarora closed this task as Resolved.