diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2024-08-06 18:00:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-06 18:00:32 +0300 |
commit | 0bf3b61457e7c77e91fb03d91b4caf0d702f99fa (patch) | |
tree | 8f43417c7f5605c3cee9a4d5c9fe255abbd63b4a /indra/llcommon/lleventapi.cpp | |
parent | cf29b701b19644062a1428a64023c3cf9829e2de (diff) | |
parent | 628cd605080546c400d3343bf0834bebf693bbcf (diff) |
Merge branch 'release/luau-scripting' into lua-ui-visibility
Diffstat (limited to 'indra/llcommon/lleventapi.cpp')
-rw-r--r-- | indra/llcommon/lleventapi.cpp | 20 |
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), |