From 2aad1ecd90dd8effd9402e55bdb0c0a49a7a4625 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 4 Jun 2016 18:11:28 +0200 Subject: [PATCH] FIRE-19415; Warn about messages with no body element. --- indra/newview/lleventpoll.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 7178042b32..2bc68e639a 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -40,6 +40,8 @@ #include "llcorehttputil.h" #include "lleventfilter.h" +#include "llsdutil.h" // for ll_pretty_print_sd + namespace LLEventPolling { namespace Details @@ -103,7 +105,15 @@ namespace Details std::string msg_name = content["message"]; LLSD message; message["sender"] = mSenderIp; - message["body"] = content["body"]; + // Guard against messages with no "body" + + // message["body"] = content["body"]; + + if( content.has( "body" ) ) + message["body"] = content["body"]; + else + LL_WARNS() << "Malformed content? " << ll_pretty_print_sd( content ) << LL_ENDL; + // LLMessageSystem::dispatch(msg_name, message); }