config: validate standalone.port_range at load #653

Open
opened 2026-08-13 14:31:51 +00:00 by the.auditor · 0 comments
Owner

internal/config/config.go defines standalone.port_range as a "min-max" host port range, but validate() only constrains network_mode. Invalid values (e.g. "abc", "1000", "9000-1000") load silently and only fail when Phase 3 parses them. Consider validating format, min<=max, and 1-65535 bounds at load time for fail-fast behavior.

See PR #652.

`internal/config/config.go` defines `standalone.port_range` as a `"min-max"` host port range, but `validate()` only constrains `network_mode`. Invalid values (e.g. `"abc"`, `"1000"`, `"9000-1000"`) load silently and only fail when Phase 3 parses them. Consider validating format, min<=max, and 1-65535 bounds at load time for fail-fast behavior. See PR #652.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/thwap-pagesd#653
No description provided.