I am trying to provide a service on my website to allow users to upload files so others can download them.
The issue is, since some of these files I will allow to upload will be .zip/.rar files, I am curious as to what ideas exist to help prevent the uploading of archives with Viruses/trojans etc. included. Some .zip files will include legitimate .exe files,though I am not sure what options I have.
I thought about it and I don't have a method for verifying with a virus scanner on the server, since I am on shared hosting w/o the option to run a service like that... nor do I have the knowledge on how to do that. I am also aware there is no php class or database to scan the files for viruses. This means, my only options are to rely on:
a). manual approval <-开发者_开发技巧- not an acceptable option for me as it might become a busy site with thousands of uploads b). get the users to somehow point out it if has viruses through voting or "flagging", etc....
anyway, regarding "b" - what ideas would you suggest?
The "Report" button sounds like a good idea, maybe you could add a comment system too to allow people to explain why they think the file is a virus or simply a useless file (and find a way to "give thanks" to the user, like the reputation system on StackOverflow ?).
A big "report virus" button next to download? Manually approving these should be possible.
Or mark the file as "Potentially dangerous" after a number of clicks.
精彩评论