#34327 [Opn->Bgs]: Antivirus Detection and Delettion of Virus Infected Files
| From: | derick@php.net | Date: | Thu, 01 Sep 2005 11:19:58 +0000 |
| Subject: | #34327 [Opn->Bgs]: Antivirus Detection and Delettion of Virus Infected Files | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84283@lists.php.net to get a copy of this message | ||
ID: 34327
Updated by: derick@php.net
Reported By: thebomani at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: *Directory/Filesystem functions
Operating System: Red Hat Fedora 3
PHP Version: 5.0.4
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2005-09-01 13:15:54] thebomani at hotmail dot com
Description:
------------
I am writting because I am working on a script that uses CLAMAV to scan
uploaded files for viruses. I have noticed that when I upload a file
that is infected with test virus such a "eicar.com.txt" the file gets
deleted even if I rename or move the file or get a chance to scan it
for viruses. If PHP is deleting the file is there any way to stop the
file from being deleted or output the reason why the file was deleted.
Reproduce code:
---------------
<?
chmod ("$img", 0775);
$tmp_file = "/tmp/". md5(uniqid(rand(), true));
rename("$img", $tmp_file);
$clamscan_prog = "/usr/local/bin/clamscan";
$data_input = "-v --stdout $tmp_file";
$data_size = strlen("$data_input");
$scan_result = passthru("$clamscan_prog $data_input");
//unlink("$img");
die("$tmp_file <br> $scan_result");
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34327&edit=1