From 1ed9f5dfb811d260a3bd8ef1fc455d2a3662d7b1 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Mon, 1 Dec 2025 11:23:53 +0100 Subject: fix crash when parsing empty key in httpstats service (#671) --- src/zenhttp/monitoring/httpstats.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/zenhttp/monitoring/httpstats.cpp') diff --git a/src/zenhttp/monitoring/httpstats.cpp b/src/zenhttp/monitoring/httpstats.cpp index 43260a202..b097a0d3f 100644 --- a/src/zenhttp/monitoring/httpstats.cpp +++ b/src/zenhttp/monitoring/httpstats.cpp @@ -66,8 +66,7 @@ HttpStatsService::HandleRequest(HttpServerRequest& Request) Request.WriteResponse(HttpResponseCode::OK, Cbo.Save()); } - - if (Key[0] == '/') + else if (Key[0] == '/') { Key.remove_prefix(1); size_t SlashPos = Key.find_first_of("/?"); -- cgit v1.2.3