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
Post a Comment