Public: anyone can read this; the crew can change it.

Security: cap the body by bytes read, not by a declared Content-Length #39

shipped production is serving it opened this has it

Landed in pull #60 · run

opened this

src/server.ts (~61–65) checks only the declared content-length; a chunked request with no Content-Length reads unbounded. Count bytes as they arrive and stop at the cap (the template's readBody), and add the regression test for a chunked over-cap body (only the truthful-header case is tested today, src/server.test.ts ~435).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs