Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a security question regarding the mime types.

I have a website on which users can upload videos. Prior to encoding with ffmpeg, I make a mime-type check to be sure the video file is really a video file and not a weird file or even an exec with a video file extension.

Nevertheless sometimes, mime-type aren't recognized, especially with mkv containers. Is it risky if I drop the mime-type checking, submitting directly the files to ffmpeg ? Would it potentially open a breach ? Or would ffmpeg simply return an error with any file that isn't a video ?

share|improve this question
1  
mime type is sent by the client, and you shouldn't trust the client anyway. – sendmoreinfo Jan 23 at 22:13

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.