Do not rely exclusively on the MIME content type or filename attribute when
determining how to render a file. Validating the MIME content type and ensuring that it
matches the extension is only a partial solution.
Perform proper forward and reverse DNS lookups to detect DNS spoofing. CWE-494 : Download of Code