summaryrefslogtreecommitdiff
path: root/indra/llcommon/lleventapi.cpp
diff options
context:
space:
mode:
authornat-goodspeed <nat@lindenlab.com>2024-09-24 07:28:44 -0400
committerGitHub <noreply@github.com>2024-09-24 07:28:44 -0400
commit1175288a3c685310dbbf7fdd46d7deae0b0bf92d (patch)
tree84fd4d186169807c4da1c0c352d9be92f1e63227 /indra/llcommon/lleventapi.cpp
parent0ee1106faccf90c883d8b9ffc522a341659742ed (diff)
parent9036e4582cec1893016bd692293ec1c0135f7112 (diff)
Merge pull request #2534 from secondlife/release/luau-scripting
Add Lua scripting to develop, behind feature flag
Diffstat (limited to 'indra/llcommon/lleventapi.cpp')
-rw-r--r--indra/llcommon/lleventapi.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/llcommon/lleventapi.cpp b/indra/llcommon/lleventapi.cpp
index 8b724256b8..4672371b4f 100644
--- a/indra/llcommon/lleventapi.cpp
+++ b/indra/llcommon/lleventapi.cpp
@@ -55,6 +55,26 @@ LLEventAPI::~LLEventAPI()
{
}
+bool LLEventAPI::process(const LLSD& event) const
+{
+ // LLDispatchListener is documented to let DispatchError propagate if the
+ // incoming request has no "reply" key. That may be fine for internal-only
+ // use, but LLEventAPI opens the door for external requests. It should NOT
+ // be possible for any external requester to crash the viewer with an
+ // unhandled exception, especially not by something as simple as omitting
+ // the "reply" key.
+ try
+ {
+ return LLDispatchListener::process(event);
+ }
+ catch (const std::exception& err)
+ {
+ // log the exception, but otherwise ignore it
+ LL_WARNS("LLEventAPI") << LLError::Log::classname(err) << ": " << err.what() << LL_ENDL;
+ return false;
+ }
+}
+
LLEventAPI::Response::Response(const LLSD& seed, const LLSD& request, const LLSD::String& replyKey):
mResp(seed),
mReq(request),