From 912bec91bf2cfbf42663d83674d75d1e61693d84 Mon Sep 17 00:00:00 2001 From: jyelon Date: Mon, 23 Oct 2023 21:22:48 -0400 Subject: [PATCH] More correct handling of incorrect actor id from client --- luprex/cpp/core/lpxserver.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/luprex/cpp/core/lpxserver.cpp b/luprex/cpp/core/lpxserver.cpp index 18796623..f051a4ee 100644 --- a/luprex/cpp/core/lpxserver.cpp +++ b/luprex/cpp/core/lpxserver.cpp @@ -149,13 +149,14 @@ public: } catch (const StreamEofOnRead &seof) { sb->unread_to(tr_before); return false; - } catch (const StreamCorruption &scorr) { + } catch (const StreamException &sexcept) { delete_client(client); return false; } + // Security check. if (inv.actor() != client->actor_id_) { - stdostream() << "Ignoring invoke with wrong actor ID " << inv.actor() << std::endl; - return true; + delete_client(client); + return false; } //stdostream() << "Invoking: " << inv.debug_string() << std::endl; master_->invoke(inv);