fix(node): bound the panel GUIDs a peer reports

A peer's panelGuid is copied into nodes.guid and into every inbound row
it reports (an indexed column), a forwarded origin GUID likewise, and a
GUID-keyed IP tree or a master's global-traffic push keys one row per
client. One oversized value therefore multiplied into gigabytes stored.
GUIDs over 64 bytes (panels mint 36-character UUIDs) now fail the
heartbeat, fall back to the reporting node's key, or are dropped.
This commit is contained in:
MHSanaei
2026-10-31 09:22:24 +00:00
parent 9cf8c87e8d
commit 87f3f54ea6
7 changed files with 67 additions and 2 deletions
@@ -19,7 +19,7 @@ const globalTrafficHeartbeatInterval = time.Hour
// Identical usage refreshes hourly; client_traffics remains local-only for delta accounting.
func (s *InboundService) AcceptGlobalTraffic(masterGuid string, traffics []*xray.ClientTraffic) error {
masterGuid = strings.TrimSpace(masterGuid)
if masterGuid == "" {
if masterGuid == "" || len(masterGuid) > maxPanelGuidLen {
return nil
}
emails := make([]string, 0, len(traffics))