diff options
| author | Dan Engelbrecht <[email protected]> | 2025-12-01 11:23:53 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-12-01 11:23:53 +0100 |
| commit | 1ed9f5dfb811d260a3bd8ef1fc455d2a3662d7b1 (patch) | |
| tree | 330f13bfd3f5df5b30b2ed47446ecd99ed5b827c /src/zenhttp/monitoring/httpstats.cpp | |
| parent | 5.7.13-pre0 (diff) | |
| download | zen-1ed9f5dfb811d260a3bd8ef1fc455d2a3662d7b1.tar.xz zen-1ed9f5dfb811d260a3bd8ef1fc455d2a3662d7b1.zip | |
fix crash when parsing empty key in httpstats service (#671)
Diffstat (limited to 'src/zenhttp/monitoring/httpstats.cpp')
| -rw-r--r-- | src/zenhttp/monitoring/httpstats.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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("/?"); |