note 30658 added to features.file-upload
| From: | diegoful at yahoo dot com | Date: | Tue, 25 Mar 2003 06:22:23 +0000 |
| Subject: | note 30658 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45781@lists.php.net to get a copy of this message | ||
SECURITY CONSIDERATION: If you are saving all uploaded files to a directory accesible with an URL,
remember to filter files not only by mime-type (e.g. image/gif), but also by extension. The
mime-type is reported by the client, if you trust him, he can upload a php file as an image and then
request it, executing malicious code.
I hope I am not giving hackers a good idea anymore than I am giving it to good-intended developers.
Cheers.
--
http://www.php.net/manual/en/features.file-upload.php
http://master.php.net/manage/user-notes.php?action=edit+30658
http://master.php.net/manage/user-notes.php?action=delete+30658
http://master.php.net/manage/user-notes.php?action=reject+30658