From e30ada33e8fd9bb126fcdb7818f24dc5dba27b92 Mon Sep 17 00:00:00 2001 From: fl0l0u Date: Sun, 15 Nov 2026 17:21:14 +0000 Subject: [PATCH] server: the worker-start failure logs its reason sanitized The HTTP pool's start() caught std::system_error and printed e.what() raw. An OS message carries no socket bytes, but every other catch in the transport reads it through log_sanitize, and consistency is the cheap half of the guarantee: a message that ever carried a token or a control character would print straight into the operator's log. One call to log_sanitize, and every line this transport writes from a caught exception now says so through the same filter. --- core/server/http.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/server/http.cpp b/core/server/http.cpp index 1cd32a1e..04af489f 100644 --- a/core/server/http.cpp +++ b/core/server/http.cpp @@ -432,7 +432,10 @@ private: try { threads_.emplace_back([this] { work(); }); } catch (const std::system_error& e) { - RAD_WARN("server: cannot start an HTTP worker (%s); the connection waits", e.what()); + /* An OS message carries no socket bytes, but it is still text this log must not + * pass through unsanitized -- every other catch here reads it through log_sanitize. */ + RAD_WARN("server: cannot start an HTTP worker (%s); the connection waits", + log_sanitize(e.what()).c_str()); return false; } ++free_;