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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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