I have a contact form where you can upload a file, and rather than say what files can go, i’d like to say which cannot. What are file types that could be harmful if they are opened? All I have right now in the list is .exe. I’m doing this in php if that matters at all.
Thanks in advance.
In terms of security, there are no file types that are “safe” to open. Many viruses take advantage of errors in how a program on your computer opens up a normally benign file to run malicious code. There have been viruses with common file types such as word and jpeg, as well as many uncommon ones. There even was a recent vulnerability with IE and CSS files.
That said, many places do block attachments of executable files like .exe & archive files like .zip, which may contain executable files. Most don’t block script files like .bat, .py, etc, but that would probably be helpful as well.
In short, if you are worried about security, never open files from an unknown person. Even images and documents have been known to carry viruses in the past.