note 109495 added to features.file-upload
| From: | Thomas | Date: | Sun, 22 Jul 2012 18:08:29 +0000 |
| Subject: | note 109495 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-189354@lists.php.net to get a copy of this message | ||
@ Anonymous 27-Jun-2012 11:20
"In this script we add some restrictions to the file upload. The user may only upload .gif or
.jpeg files"
MIME type can be faked, With the example you provided you are opening yourself malicious uploads.
VVV
$_FILES['userfile']['type']
The mime type of the file, if the browser provided this information. An example would be
"image/gif". This mime type is however not checked on the PHP side and therefore
don't take its value for granted.
http://www.php.net/manual/en/features.file-upload.post-method.php
----
Server IP: 69.147.83.197
Probable Submitter: 88.96.89.222
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.php
Edit -- https://master.php.net/note/edit/109495
Del: integrated -- https://master.php.net/note/delete/109495/integrated
Del: useless -- https://master.php.net/note/delete/109495/useless
Del: bad code -- https://master.php.net/note/delete/109495/bad+code
Del: spam -- https://master.php.net/note/delete/109495/spam
Del: non-english -- https://master.php.net/note/delete/109495/non-english
Del: in docs -- https://master.php.net/note/delete/109495/in+docs
Del: other reasons-- https://master.php.net/note/delete/109495
Reject -- https://master.php.net/note/reject/109495
Search -- https://master.php.net/manage/user-notes.php