Skip to main content
Participant
March 13, 2008
Question

cffile, upload and viruses

  • March 13, 2008
  • 2 replies
  • 405 views
OK, so I was reading a response on cf-talk, where someone mentioned
the importance of scanning uploaded files for viruses...I hadn't thought of that.

Two questions:
1. If all I allow for uploads is pdf and jpg, is that still neccessary?

2. My site is on a vps so it would be all self serve...what can I use and
how do I get it to scan the uploaded file?

TIA,

Mark
    This topic has been closed for replies.

    2 replies

    Superflair
    Participating Frequently
    March 19, 2008
    CFFILE will copy the uploaded file to a temporary location of your choice as usual, then wait 1 second and try copy the file to its final destination... if file is not found your anti-virus took it down -- proceed accordingly with the user feedback -- , otherwise that's a good file. No worry then.
    Participating Frequently
    March 13, 2008
    Just the first hits on Google and old articles. Yes, you have to worry.

    New Virus Travels in PDF Files (2001)
    http://www.news.com/New-virus-travels-in-PDF-files/2100-1001_3-271267.html

    Picture this: a virus in a JPEG (2002)
    http://www.sophos.com/pressoffice/news/articles/2002/06/va_perrun.html

    Depends on your scanning software. Most will automatically quarantine the file. The only problem is that unless you have some sort of communcation between the scanning software and CF, you may end up having an upload entry in a database, but the actual file has been removed. That and there may be a small delay between the scan/quarantine and when the file was made available for download after the upload.

    You may want to look in to a manual scanning method. Upload the file into a temporary directory, then execute the manual method either through a cfexecute or perhaps if your lucky a Java object using a virus scanner API. then if all reports ok, move the file from the temp directory to an available status.