Report any technical problems you discover and discuss solutions.

v3: bug clamav antivirus check output not shown

Plus d'informations
il y a 10 ans 11 mois #3055 par jayaich
Hello,

The antivirus check captures the output from the 'exec' function. However, the output is an array corresponding to each line of output. The code currently shows it just as the array variable name, and so the output is not displayed. To correct this we need to implode the array into a string, and then display that. A patch for this is below:
Code:
--- library/Xerte/Validate/VirusScanClamAv.php.orig 2015-07-29 23:17:23.000000000 +0100 +++ library/Xerte/Validate/VirusScanClamAv.php 2015-08-20 14:57:02.014822249 +0100 @@ -43,9 +43,10 @@ return true; } else { - error_log("Virus found in file upload? $filename --- From " . __FILE__ . " - ClamAV output: {$retval} / {$output}"); - _debug("Virus found? {$retval} / {$output} (When scanning : $filename)"); - $this->messages[$retval] = "Virus found? $output"; + $output_str = implode(' ', $output); + error_log("Virus found in file upload? $filename --- From " . __FILE__ . " - ClamAV output: {$retval} / {$output_str}"); + _debug("Virus found? {$retval} / {$output_str} (When scanning : $filename)"); + $this->messages['VIRUS_FOUND'] = "Virus found? $output_str"; } } else {



John.

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: ronmjultenJohnSmith
Temps de génération de la page : 0.129 secondes
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo