A tween checking file uploads for viruses using clamav.
Pyramid tween which checks file uploads for viruses using clamav.
You need to have a running clamav installation on your system to which the tween can connect via a unix socket. You can set the socket path in your config (pyramid_clamav.socket), but the defaults should work on most systems.
If you want to deactivate scanning (i.e. for testing or your local development environment), you can set pyramid_clamav.debug to a value. Then flash- and logmessages are generated if there was a file upload and clamav is not properly configured.
If a virus was found, the file is removed from the request. The field which was used to upload the file should handle it like no file was uploaded.
A flashmessage is presented to the user stating that a file contained a virus and it has been removed.
It should also work for multiple files.
- When collecting file uploads from the request, check for file-like objects instead of instances of exact type file.
- Fix small issue when the value for pyramid_clamav.debug is not configured.
- pyramid_clamav.debug can now be set in config. If enabled AND clamav is not configured, it will generate a flash message when a file upload was found, but the file will not be touched. Additionally errors are logged at startup and on file uploads.
- Fixed setup.py to contain locale directory.
- Initial release.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size pyramid_clamav-0.5.tar.gz (4.8 kB)||File type Source||Python version None||Upload date||Hashes View hashes|