senchalabs/connect — Issue #446: Limit post size to help against DoS attacks
Author: alessioalex
Created: 2011-12-29 10:02:19+00:00
State: open

This won't solve the problem completely, but it would help.

Read more about this problem here:

http://www.ocert.org/advisories/ocert-2011-003.html
http://www.youtube.com/watch?v=R2Cq3CLI6H8

The Socket.IO guys already made a commit for this a month ago:

https://github.com/LearnBoost/socket.io/commit/a7f45fe6c03df37973f7a634d0aaf6ff93cb407a

I think we should be able to specify a max post size and the bodyParser should kill what exceeds that. The implementation should probably be done in the file: https://github.com/senchalabs/connect/blob/master/lib/middleware/json.js