Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for empty / Null files #18

Closed
maksym3d opened this issue Dec 5, 2023 · 1 comment
Closed

Check for empty / Null files #18

maksym3d opened this issue Dec 5, 2023 · 1 comment

Comments

@maksym3d
Copy link

maksym3d commented Dec 5, 2023

The validator appears to throw an exception when the submitted file is null - since a null / non-existing file is not an infected file, I would suggest wrapping the initial seek(0) with a try/except:

# Check if the file is not empty / exists
try:
    file.seek(0)
except:
    return
vstoykov added a commit that referenced this issue Dec 20, 2023
- Use latest supported Python and Django versions and drop Python 2 support
- Remove some deprecation warnings
- Use GitHub Actions instead of TravisCI
- Support passing None to validate_file_infection (#18)
- Bump version to 1.0.0
vstoykov added a commit that referenced this issue Dec 20, 2023
- Use latest supported Python and Django versions and drop Python 2 support
- Remove some deprecation warnings
- Use GitHub Actions instead of TravisCI
- Support passing None to validate_file_infection (#18)
- Bump version to 1.0.0
@vstoykov
Copy link
Owner

Fixed in #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants