Hi!
I trying to fix a upload filter to one of my sites. The site i protected by a login, only 4 users, so one might argue thats theres not likely to be any mischief. Nevertheless, I want to tighten the upload security.
if (($_FILES['file']['type'] != "text/csv"))
{
$report[] = "Thats not a cvs-file!.";
}
Edit: I accidentally clicked post while previewing, sorry, heres the end of the post.
This works fine as long as the user doesn't try manipulate the file/file-extension. What if a user makes a vicious_phpfile.cvs and uploads it? So whats the freaking problem, why not just get on with it? Well I found some functions in the manual. This is where its getting frustrating. I can't get it to work, no nothing, white death is all I get. mime_content_type or fileinfo I would really appreciate some pointers or help on this one. :-(