{"id":"XE-13272","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"417","source_url":"https://github.com/xeprotocol/xe/issues/417","reporter_id":2483,"title":"[net/msg.go] L1: Handle() tidak cek duplicate registration — silent overwrite","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.890498+00:00","updated_at":"2026-11-20T00:51:09.797301+00:00","source_created_at":"2026-11-12T02:48:03+00:00","told_at":"2026-11-20T00:49:16+00:00","status_changed_at":"2026-11-20T00:33:25.312333+00:00","url":"https://bounty.xe.network/XE-13272","body":"## Ringkasan\nHandler yang di-register dengan msgType yang sama akan ditimpa tanpa warning.\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\nKalau ada dua panggilan `Handle` dengan msgType sama, handler pertama hilang tanpa notice. Bisa menyebabkan behavior tidak expected.\n\n## Suggested Fix\n```go\nfunc (m *Messenger) Handle(msgType string, handler func(peer.ID, json.RawMessage) (json.RawMessage, error)) {\n    if handler == nil {\n        return\n    }\n    m.mu.Lock()\n    if _, exists := m.handlers[msgType]; exists {\n        logging.Warnf(\"msg: duplicate handler registration for %q\", msgType)\n    }\n    m.handlers[msgType] = handler\n    m.mu.Unlock()\n}\n```","patch_refs":[],"thread":[{"id":13337,"source":"github","source_ref":"7026788075","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-13272 and says what; it is read like any other.","created_at":"2026-11-20T00:49:16+00:00"}]}