Re: upload files and file types

From: Date: Sat, 22 Mar 2003 16:19:11 +0000
Subject: Re: upload files and file types
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-140690@lists.php.net to get a copy of this message
hi there , i was wondering on security of file uploads , i am currently using the pear uploader class , i can check for allowed file extensions , but it doesnt seem to check for file type , i can currently rename say an image to zip and it uploads , is there anyway a hacker could rename an executable to a zip and able to upload it and execute it ?
I can't address your specific question but here are a couple of recommendations: -Rename the uploaded file so that the user won't know what it's called on the server. -Store the file outside of the Web directory so it's not accessible via HTTP. Hope that helps, Larry

« previous php.general (#140690) next »