das-labor / neopg

The multiversal cryptoengine!
Other
216 stars 16 forks source link

Set maximum filesize for Http transfers. #40

Closed lambdafu closed 6 years ago

lambdafu commented 6 years ago

We should limit the amount of transfered bytes in all cases to prevent DoS attacks by malicious servers. This patch achieves that reliably and sets a default limit of 2MB, which should be plenty for most use cases within NeoPG even without any special considerations.