Report any technical problems you discover and discuss solutions.

v3: bug clamav antivirus check output not shown

  • jayaich
  • Onderwerp Auteur
  • Offline
  • Premium lid
  • Premium lid
Meer
11 jaren 1 maand geleden #3055 door 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.

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Moderators: ronm, julten, JohnSmith
Tijd voor maken pagina: 0.140 seconden
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo