Last modified: 2006-05-26 19:16:00 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 6080 - Prevent users from uploading images with + in name
Prevent users from uploading images with + in name
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
PC Windows XP
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-25 09:57 UTC by Marco
Modified: 2006-05-26 19:16 UTC (History)
0 users

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


Attachments

Description Marco 2006-05-25 09:57:05 UTC
An user has uploaded the image [[de:Image:Fussel+Socke.jpg]] without knowing
that + is the urlencode for spaces. So this image is not accessible for bots and
the IE.

May someone fix the image name and put some preventer in the MediaWiki code please?
Comment 1 Brion Vibber 2006-05-25 10:10:49 UTC
This should work fine with bots and IE. Can you provide a more 
detailed description of the problem?
Comment 2 Marco 2006-05-25 10:16:10 UTC
I can not see the image when I click on
http://upload.wikimedia.org/wikipedia/de/c/c7/Fussel%2BSocke.jpg
(HTTP 4o4)

In Firefox all things are normal.

I requested the preventer because the + char is normally the URLENCODEd char for
" "s and so it is possible (especially for mirrors!) that there can problems result.
Comment 3 Brion Vibber 2006-05-25 19:30:47 UTC
This URL works just fine in IE 6.0 / Win98 and IE 7beta2 / WinXP.
Note that:
1) + has no special meaning in URL path components.
2) %2b is used for encoding the + in any case.
Comment 4 Marco 2006-05-26 15:32:23 UTC
for 1): try in PHP5  the line <? echo urldecode("Fussel+Socke.jpg"); ?>; it will
echo "Fussel Socke.jpg".
for 2): try in PHP5  the line <? echo urldecode("Fussel%2BSocke.jpg"); ?>; it
will echo "Fussel Socke.jpg".
(note: I tested on Windows XP SP1, maybe that PHP behaves different, then bug is
for wreck)

greets,
marco
Comment 5 Brion Vibber 2006-05-26 18:26:16 UTC
The statement above is false: your second code fragment in fact 
outputs "Fussel+Socke.jpg", as expected.
Comment 6 Marco 2006-05-26 19:16:00 UTC
Ah, I think I know the reason:
It is the file encoding. When it is UTF-8, then the PHP snipps will act as I
told. When it is other charset (yeah, Turkish also works), it acts as you've told.
Strange thing.

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


Navigation
Links