[Mediawiki-l] using clamav for virus scanning with Mediawiki 1.13alpha
Darren VanBuren
onekopaka at gmail.com
Tue Jul 22 01:42:52 UTC 2008
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 at gmail.com
----------------------------------------------
Administrator of Onekopakaspace
Trunk MediaWiki install:
http://oks.verymad.net/~onekopaka/mwtrunk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://lists.wikimedia.org/pipermail/mediawiki-l/attachments/20080721/263bcc8a/attachment.pgp
More information about the MediaWiki-l
mailing list