{"id":"XE-13274","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"419","source_url":"https://github.com/xeprotocol/xe/issues/419","reporter_id":2483,"title":"[net/msg.go] L3: Handle() tidak check empty msgType — silent registration of empty key","area":"p2p-sync","claimed_tier":null,"assessed_tier":null,"verdict":"invalid","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"invalid","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:06.959915+00:00","updated_at":"2026-11-20T00:51:14.082487+00:00","source_created_at":"2026-11-12T02:48:29+00:00","told_at":"2026-11-20T00:49:31+00:00","status_changed_at":"2026-11-20T00:33:25.968534+00:00","url":"https://bounty.xe.network/XE-13274","body":"## Ringkasan\nTidak ada check apakah `msgType` adalah empty string. Kalau empty, handler di-register dengan key kosong dan tidak bisa dipanggil dari `handleMessage` (yang cuma baca 1 byte).\n\n## Lokasi\n- File: `net/msg.go`\n- Lines: 147-151\n\n## Kode\n```go\nfunc (m *Messenger) Handle(msgType string, handler func(peer.ID, json.RawMessage) (json.RawMessage, error)) {\n    m.mu.Lock()\n    m.handlers[msgType] = handler\n    m.mu.Unlock()\n}\n```\n\n## Impact\nHandler dengan key kosong tidak bisa di-invoke. Resource waste.\n\n## Suggested Fix\n```go\nfunc (m *Messenger) Handle(msgType string, handler func(peer.ID, json.RawMessage) (json.RawMessage, error)) {\n    if msgType == \"\" {\n        logging.Warnf(\"msg: attempt to register handler with empty msgType\")\n        return\n    }\n    m.mu.Lock()\n    m.handlers[msgType] = handler\n    m.mu.Unlock()\n}\n```","patch_refs":[],"thread":[{"id":13366,"source":"github","source_ref":"7026793325","author":"XE desk","team":true,"body":"Thanks for the report. We read it against the code and could not confirm a bug in what it describes.\n\nThis report is closed as invalid. If we have missed something, file a new report that links\nhttps://bounty.xe.network/XE-13274 and says what; it is read like any other.","created_at":"2026-11-20T00:49:31+00:00"}]}