Page MenuHomePhabricator

[upload.py] Question mark character is forbidden in target file name, but the wiki accepts it
Closed, ResolvedPublic

Description

When I try to upload a file that contains a question mark on it, it displays an error, prompting me to change the target filename:

Invalid character(s): %s. Please try again

But the wiki accepts it as a destination filename. The problem is that it's listed as a forbidden character:

# FIXME: these 2 belong somewhere else, presumably in family
# forbidden characters are handled by pywikibot/page.py
forbidden = ':*?/\\'  # to be extended

I guess it could be removed, since if it's really forbidden, the wiki will throw the error when trying to upload.

Event Timeline

Ciencia_Al_Poder raised the priority of this task from to Lowest.
Ciencia_Al_Poder updated the task description. (Show Details)
Ciencia_Al_Poder added a project: Pywikibot.
Ciencia_Al_Poder subscribed.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptMar 21 2015, 7:14 PM

Change 753092 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] remove question mark character from forbidden file name characters

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

Change 753092 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] remove question mark character from forbidden file name characters

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