Last modified: 2007-07-18 18:33:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T12631, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10631 - Warn when illegal characters are removed from filename
Warn when illegal characters are removed from filename
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.11.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-18 13:07 UTC by Lejonel
Modified: 2007-07-18 18:33 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Lejonel 2007-07-18 13:07:26 UTC
When uploading files with a destination filename that contains slashes, only the part of the name after the slash is used. The other part of the name is removed when pressing upload file. There should be a warning about the changed name, like the warning when spaces are changed to underscores.
Comment 1 Raimond Spekking 2007-07-18 16:07:47 UTC
Fixed with r24241.

The warning was missed for all illegal characters.

Comment 2 Brion Vibber 2007-07-18 18:33:20 UTC
Hmm, seems to me there's still a bit of a problem with how the 'destination filename' box is treated compared to the originally-reported upload filename.

Since the reported upload filename sometimes includes a path, calling wfBasename() to strip the path components is a fairly sane way to treat it, and we wouldn't want to give a warning about it at that level.

The destination name, though, will usually be one of:
* The already-stripped filename provided by the inline JS
or
* Whatever the user typed in manually to override it.

In the former case, there shouldn't be any /s or \s since it's already been stripped clinet-side. In the latter case, the user might have typed a / or \ deliberately.

For an example, I tried setting a destination filename to "Graphite-half-1680 (OS/X).png" and got told the filename was being stripped to "X).png".

Better behavior might be to take the given destination filename and just strip out any / and \ chars as we do for : and other illegals, giving in this case "Graphite-half-1680 (OS-X).png"

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links