kylefarris / clamscan

A robust ClamAV virus scanning library supporting scanning files, directories, and streams with local sockets, local/remote TCP, and local clamscan/clamdscan binaries (with failover).
MIT License
236 stars 69 forks source link

Init does not reject errors. #55

Closed GeorgeCalvert closed 4 years ago

GeorgeCalvert commented 4 years ago

We were trying to catch startup errors in the init method but not seeing them. Thanks to our team member @saijian2008, we found the problem is index.js:571. It should use reject not resolve, i.e.:

return (has_cb ? cb(err, false) : reject(err));
kylefarris commented 4 years ago

Interesting... I thought I just resolved this issue with the latest release. I'll go back and check. Thanks!

niftylettuce commented 4 years ago

See #57 @kylefarris - can you please fix this? I would gladly tip you over PayPal a bug bounty award.

Currently using your great project in https://forwardemail.net and https://spamscanner.net.

kylefarris commented 4 years ago

@niftylettuce Do you think this is the problem on #57? If so, I'll take care of it really quick.

kylefarris commented 4 years ago

I've patched the module. The patch is available in v1.3.3