narfbg/CodeIgniter — comment on commit a49e381fde010a7a83845910c0f772fb139f0b1e
File: system/libraries/Upload.php line 1117
By narfbg:

In a properly working environment, `mime_content_type()` will return the correct value. The purpose of all of these checks is to not rely on what `$file['type']` says for two reasons:

- It's content can be spoofed
- Even if it's a genuine info sent from a browser, it's never guaranteed that it's correct

... so the point isn't to check if what we can detect is the same that is sent to us, but rather to not need the MIME type sent by the client for validation.