There are a million files that load scripts. This one is not worse than others.
Although the "protection" from downloading files other than png will not work (it only checks the file name).
Uploading files is completely safe - it gives others the ability to upload them, which opens your server to certain types of attacks. The article you referred to does not mention two important points:
- never serve user-submitted files from the same domain as your web page . You have a separate domain to download. Thus, even if someone succeeds in loading a flash animation or HTML fragment, your domain will not suffer from a cross-domain attack (for example, if your application has the example.org domain, you must serve user-generated content, say, via downloads. Example.com );
- always serves uploaded files with well-controlled headers.
fdreger
source share