ensuring uploaded files are safe

后端 未结 6 2091
予麋鹿
予麋鹿 2021-01-04 23:23

My boss has come to me and asked how to enure a file uploaded through web page is safe. He wants people to be able to upload pdfs and tiff images (and the like) and his real

6条回答
  •  日久生厌
    2021-01-05 00:13

    Use a reverse proxy setup such as

    www <-> HAVP <-> webserver

    HAVP (http://www.server-side.de/) is a way to scan http traffic though ClamAV or any other commercial antivirus software. It will prevent users to download infected files. If you need https or anything else, then you can put another reverse proxy or web server in reverse proxy mode that can handle the SSL before HAVP

    Nevertheless, it does not work at upload, so it will not prevent the files to be stored on servers, but prevent the files from being downloaded and thus propagated. So use it with a regular file scanning (eg clamscan).

提交回复
热议问题