Welcome Guest, Not a member yet? Register   Sign In
Certain file types getting past upload filter!
#1

[eluser]Paul Wenzel[/eluser]
I set up an upload form using CI's Upload class, configuring it to allow uploading of a handful of video formats using this line of code:
Code:
$config['allowed_types'] = 'flv|mov|m4v|mp4|qt|avi';

I tested it out by trying to upload a .JPG file, and as expected, the script would not allow it to pass through.

Now, the site went live, and a user uploaded a file with a "MSWMM" extension. For some reason, the Upload class will not allow JPG files to pass through, but it will allow files with arbitrary file extensions, including "MSWMM" files. To test this, I uploaded a file named "test.blat", and it went through!

Is there further configuration I need to do with regard to MIME types to lock this form down? Any suggestions would be greatly appreciated.

This is using CodeIgniter 1.5.4.




Theme © iAndrew 2016 - Forum software by © MyBB