Skip to content
This repository has been archived by the owner on Dec 16, 2017. It is now read-only.

Feature Request: download size filter #148

Open
eldraco opened this issue Apr 4, 2015 · 1 comment
Open

Feature Request: download size filter #148

eldraco opened this issue Apr 4, 2015 · 1 comment
Milestone

Comments

@eldraco
Copy link

eldraco commented Apr 4, 2015

Does it have some sort of download size filter? So we can avoid downloading a 1GB file?

@krmaxwell krmaxwell added this to the v0.8 milestone Apr 4, 2015
@krmaxwell
Copy link
Owner

For serves that provide a Content-Length HTTP header, we could possibly do this. The caveat of course is that the spec does not require servers to provide this header and so we won't always know a file size until we grab the file.

If somebody wants to implement this, I'd like to see it this way:

  • Option in maltrieve.cfg specifying max file size
  • The Body Content Workflow feature of requests can do this with appropriate logic.
  • If no option is specified, then don't restrict file size.

This is probably a security issue, to be honest, because a malicious attacker could serve a fake stream to fill up the file system where Maltrieve stores the data. But in that case they probably won't use the Content-Length header and so this wouldn't fix that. So, separately from any code implementation as described above, the documentation should make clear that dumpdir needs to be on a non-system partition to avoid a denial of service.

I appreciate this question, it's really helpful!

@krmaxwell krmaxwell changed the title Question or Feature Request Feature Request: download size filter Apr 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants