Add a 1 MB payload limit to incoming websocket requests

This commit is contained in:
JoelKatz
2013-12-09 00:33:42 -08:00
parent 1e00940a90
commit 071db75f04
3 changed files with 6 additions and 4 deletions

View File

@@ -42,7 +42,8 @@ std::string RPCServerHandler::processRequest (std::string const& request, std::s
{
Json::Reader reader;
if (! reader.parse (request, jvRequest) ||
if ((request.size() > 1000000) ||
! reader.parse (request, jvRequest) ||
jvRequest.isNull () ||
! jvRequest.isObject ())
{