I am trying to get mediawiki to have clamscan scan files that are uploaded. Now every file I upload that doesn't have a virus gives this message:
Upload warning The file contains a virus! Details: scan failed (code 127)
These files check out clean when I run clamscan by my self.
However, files WITH a virus are able to be uploaded!
Later:
My current fix is changing line 310 - 318 of DefaultSettings.php to this:
'clamav' => array ( 'command' => "clamscan --no-summary ",
'codemap' => array ( "127" => AV_NO_VIRUS, # no virus "0" => AV_VIRUS_FOUND, # virus found "52" => AV_SCAN_ABORTED, # unsupported file format (probably imune) "*" => AV_SCAN_FAILED, # else scan failed ), I am working on finding the correct Virus Found code.
In addition, here's output of a virus found with clamscan --no-summary :
test/clam.zip: ClamAV-Test-File FOUND
So we should parse for FOUND on line 320.
Darren VanBuren onekopaka@gmail.com ---------------------------------------------- Administrator of Onekopakaspace
Trunk MediaWiki install: http://oks.verymad.net/~onekopaka/mwtrunk/
mediawiki-l@lists.wikimedia.org