Commit Graph
2 Commits
Author SHA1 Message Date
Audric 166e57f445 Implement cluster TGs and /config HTTP endpoint
Cluster TGs (BrandMeister-style): talk groups broadcast to all trunk
peers regardless of prefix ownership. Configured via CLUSTER_TGS in
[GLOBAL]. Routing checks in TrunkLink now accept isSharedTG || isClusterTG
for all 8 inbound/outbound handlers. Validated at startup to not overlap
with any LOCAL_PREFIX or REMOTE_PREFIX.

New GET /config endpoint returns static configuration (local_prefix,
cluster_tgs, listen_port, http_port, trunk peers) for dashboard use.

Docs: cluster TG sections added to README, DEPLOYMENT_ITALY, and
Italian translation. Design doc for satellite reflectors and cluster
TGs added.
2026-03-20 12:41:26 +01:00
Audric fca7c33794 Security hardening: fix 19 of 22 vulnerabilities found in audit
Critical:
- Trunk HMAC-SHA1 auth: MsgTrunkHello now carries nonce+digest,
  peer disconnected on secret mismatch (was loaded but never verified)

High:
- Pre-hello guard: reject all trunk messages before handshake completes
- CSPRNG for password generator: random.choice -> secrets.choice

Medium:
- Path traversal protection on callsign-based file operations
- Replace assert() on network-derived UDP data with error handling
- HTTP server connection throttling (matching main TCP server)
- try/catch on regex compilation in callsignOk()/emailOk()
- Per-link trunk talker tracking (clearAllTrunkTalkers scoped to peer)
- Regenerate priority nonce on each new trunk connection
- Cap active TGs and trunk talkers at 10000 each
- Don't reset heartbeat for unauthenticated client app messages
- Fix RENEW_AFTER integer division (2/3 -> 2.0/3.0)

Low:
- JSON-escape HTTP method in error response
- snprintf for pidfile error message
- MsgAuthResponse::digest() null check on empty vector
- Check unpack() return values in AsyncMsg.h vector/map/string
- Replace stack VLA with std::string; reserve+push_back vs resize
- Require TalkerStart before accepting trunk audio
2026-03-20 11:54:18 +01:00