Closed zekroTJA closed 3 years ago
Thanks for your pull request. I did some additional changes and fixes that came across during testing but these were because of my shitty codebase. I will start implementing this in the staging branch and thus deploying it on https://paste.pelkum.dev.
This pull request adds a new configuration value named
LENGTH_CAP
(which defaults to50000
). On request to thePOST /v1/pastes
, the content length header is read and compared with this config value, if it is larger than0
. If the content length is larger than the defined cap, a400 Bad Request
response with the contentrequest body length overflow
is returned.This pull request fixes #7.