[ZendTo] Re: problem with library files

Jules Jules at Zend.To
Thu Oct 4 14:43:17 BST 2012


Odd that you're getting that, I don't at all, library files work perfectly.
Are you sure you've got the very latest versions of the templates in 
your system? If you've modified the template files at all then it might 
not have overwritten your modified template with the latest one. The one 
of interest here is new_dropoff.tpl.

If you are sure that is all correct (size of that file should be 16504 
bytes), then edit NSSDropoff.php and change the chunk of code around 
line the "chmod" to this:

     // Call clamdscan on all the files, fail if they are infected
     // If the name of the scanner is set to '' or 'DISABLED' then skip 
this.
     $jkfclamdscan = $this->_dropbox->clamdscan();
     if ($jkfclamdscan != 'DISABLED') {
       $jkffilecount = 1;
       $jkffilelist = '';
       $foundsometoscan = FALSE;
       while ( $jkffilecount <= $this->maxFilesKey ) {
         $key = "file_".$jkffilecount;
         if (array_key_exists($key, $_FILES) &&
             array_key_exists('tmp_name', $_FILES[$key])) {
           $jkffilelist .= ' ' . $_FILES[$key]['tmp_name'];
           $foundsometoscan = TRUE;
         }
         $jkffilecount++;
       }
       if ($foundsometoscan) { // Don't do any of this if they uploaded 
nothing
         exec("/bin/chmod go+r " . $jkffilelist); // Need clamd to read 
them!
         $jkfinfected = 0;
         $jkfoutput = array();
         $jkfclam = exec($jkfclamdscan . $jkffilelist, $jkfoutput, 
$jkfinfected);
         if ($jkfinfected == 1) {
           return $smarty->getConfigVariable('ErrorVirusFound');
         }
         if ($jkfinfected == 2) {
           return $smarty->getConfigVariable('ErrorVirusFailed');
         }
       }
     }

If you're not happy working out what to do with that then don't attempt 
it. :-)

Jules.

On 04/10/2012 12:44, Rini van Zetten wrote:
> Hi Jules,
>
> When i select a library file to drop i get the message :
> Upload Error
> The attempt to virus-scan your drop-off failed. Please contact your 
> administrator for assistance.
>
>
> In my apache2 error log this line appears :
> /bin/chmod: missing operand after `g+r'
> Try `/bin/chmod --help' for more information.
>
> It's caused by th parameter jkffilelist in NSSDropoff.php which is empty.
> I can place an extra test in this file which skips the virus scan when 
> the jkffilelist is empty but there may be other solutions.
>
> This bug occurs in 4.10 as well as in the 4.11 beta.
>
> Regards,
>
> -- 
> *Rini van Zetten*
> /Senior Software Engineer/
>
> -------------------------
> ARVOO Engineering B.V.
> Tasveld 13
> 3417 XS Montfoort
> The Netherlands
>
> Tel : 0348-418412
>
> E-mail : rini at arvoo.com <mailto:rini at arvoo.com>
>
> Web : www.arvoo.com <http://www.arvoo.com>
> **
>
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
>
> Jules
>
> -- 
> Julian Field MEng MBCS CITP CEng
> www.Zend.To
>
> Twitter: @JulesFM
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>
> 'When a man points a finger at someone else, he should remember
>   that four of his fingers are pointing at himself.' - Louis Nizer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20121004/9c48ebd2/attachment.html 


More information about the ZendTo mailing list