logoalt Hacker News

TheJoeMan • today at 5:39 PM • 1 reply • view on HN

As long as programmers trust 3rd-party-provided content-length input, it will be insecure. At this point, I'm not sure why we even use content-length anymore since you're going to need to size your buffers based on the actual content.


Replies

InsidiousWombat • today at 9:41 PM

Because when file finishes you want to verify whether the size matches.

And for non-malicious content, you can drop file above the upload max limit before user wastes time sending the file.