A request with command arguments panics and terminates the whole server ai:claude-opus-5-5 #4
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
bug
doc
duplicate
enhancement
help wanted
invalid
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
IUS/go-nrpe#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
(co)authored by ai:claude-opus-5-5
Found while preparing the public software pages for www.schlittermann.de (static review, not a full audit).
cmd/nrpe/handler.go(around line 98):The handler runs in its own goroutine (
go handleReq(conn, checker)inmain.go). A search of the sources finds norecover()in the request path (only one inconfig.go). In Go an unrecovered panic in any goroutine terminates the process, so a single query containing!should stop the monitoring agent. (Derived from reading the code; not tested against a running instance.)Proposal: return an
UNKNOWN/error response ("command arguments not supported") instead of panicking, and adddefer recover()with logging inhandleReqas a safety net. A regression test would be good.