security - PHP: What is the origin of the 'type' index in $_FILES? -


in order validate allowed mime types in file uploads rely on fileinfo extension since extension or magic database isn't available though of using type index associated each file on $_files superglobal.

so question is, index come from? suspect either comes browser (and if that's case can forged) or, likely, web server (or php) - , if case: extension mime type mapping or real thing?

it's mime type of file supplied browser through interpreting extension of file. you're right, can forged client.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -