using clamav for virus scanning with Mediawiki 1.13alpha

View: New views
1 Messages — Rating Filter:   Alert me  

using clamav for virus scanning with Mediawiki 1.13alpha

by Darren VanBuren :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
----------------------------------------------
Administrator of Onekopakaspace

Trunk MediaWiki install:
http://oks.verymad.net/~onekopaka/mwtrunk/



_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@...
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

PGP.sig (201 bytes) Download Attachment