Report
XE Bounty — Laporan siap file (temuan pass 4 #4)
File issue baru di: https://github.com/xeprotocol/xe/issues/new Paste judul + isi di bawah. Akun GitHub: Gib230223.
Judul
[Low] ChatStore panics when constructed with maxPerAccount <= 0
Isi
Summary
chat.NewChatStore(maxPerAccount) takes the bound with no validation, and storeFor indexes newMsgs[s.maxPerAccount-1] whenever len(msgs) >= s.maxPerAccount. With maxPerAccount == 0, len(msgs) >= 0 is always true, so the first Store panics; with a negative value, make panics. An exported constructor that panics on a plausible misconfiguration.
Evidence
// chat/chat.go:21 — no validation of the bound:
func NewChatStore(maxPerAccount int) *ChatStore {
return &ChatStore{
messages: make(map[string][]*Envelope),
seen: make(map[string]int64),
maxPerAccount: maxPerAccount,
listeners: make([]chan *Envelope, 0),
}
}
// chat/chat.go:72-83 — storeFor panics on maxPerAccount <= 0:
func (s *ChatStore) storeFor(account string, env *Envelope) {
msgs := s.messages[account]
if len(msgs) >= s.maxPerAccount {
newMsgs := make([]*Envelope, s.maxPerAccount)
copy(newMsgs, msgs[1:])
newMsgs[s.maxPerAccount-1] = env
s.messages[account] = newMsgs
} else {
s.messages[account] = append(msgs, env)
}
}
Impact (Low, latent)
The only production caller passes 1000 (node/node.go:314: chat.NewChatStore(1000)), so there is no live production path today. Robustness / defense-in-depth: an exported constructor that panics on a plausible misconfiguration; one-line fix (clamp maxPerAccount to >= 1 in NewChatStore).
Reproduction (PoC)
TestPoc4ChatStoreZeroMaxPanics (package chat):
maxPerAccount=0: Store panicked as expected: runtime error: slice bounds out of range [1:0]
maxPerAccount=-1: Store panicked as expected: runtime error: makeslice: len out of range
Novelty note
No ticket covers the zero/negative-bound panic. Board greps for maxPerAccount, ChatStore panic return only XE-7038 (ChatStore dedup-set saturation halts all chat ingestion — a different mechanism, about the dedup set filling up, not the bound). GitHub search_issues for "ChatStore maxPerAccount panic" returns 0 results; the closest are #269 (flooding eviction — the rotation itself) and #256 (ANSI escapes) — neither is the zero/negative-bound panic. Checked the live bounty board (High+Medium and Minor views) and the GitHub repo issues, 2026-11-12.
Repo: github.com/xeprotocol/xe, HEAD 89a542e, testnet-0005.
Thread
Thanks for the report. We have read it against the current tree and it is being handled. The assessment and any award follow the fix.
Omaga
jangan asal timpa mas reportnya dibaca dulu xixixi
😹😹
lucu bgt loh rek lupa masih bahasa indo
Mana saya tau saya nyuruh Muse yang ngerjain
Pada Sab, 21 Nov 2026, 20.43, rhnhabibi @.***> menulis:
rhnhabibi left a comment (xeprotocol/xe#499) https://github.com/xeprotocol/xe/issues/499#issuecomment-7063527908
jangan asal timpa mas reportnya dibaca dulu xixixi
— Reply to this email directly, view it on GitHub https://github.com/xeprotocol/xe/issues/499?email_source=notifications&email_token=BQY7MN6LYJEUKMMVHGIEAQT52GLZZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBWGM2TENZZGA4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-7063527908, or unsubscribe https://github.com/notifications/unsubscribe-auth/BQY7MN5XET5QRHFTJZQKW7T52GLZZAVCNFSNUABGKJSXA33TNF2G64TZHMYTGMRVGI2TCNBSGE5US43TOVSTWNRTGQZDGNRSGA4DPILWAI . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS https://github.com/notifications/mobile/ios/BQY7MN7CO6GSJ34K2JZD3TT52GLZZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBWGM2TENZZGA4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG and Android https://github.com/notifications/mobile/android/BQY7MN6VZRZ7MELLG7IUE6T52GLZZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBWGM2TENZZGA4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA. Download it today! You are receiving this because you authored the thread.Message ID: @.***>
Maksud
Pada Sab, 21 Nov 2026, 20.47, rhnhabibi @.***> menulis:
rhnhabibi left a comment (xeprotocol/xe#499) https://github.com/xeprotocol/xe/issues/499#issuecomment-7063582241
lucu bgt loh rek lupa masih bahasa indo
— Reply to this email directly, view it on GitHub https://github.com/xeprotocol/xe/issues/499?email_source=notifications&email_token=BQY7MN2X2VWUY6LA6CN3F6L52GMH3A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBWGM2TQMRSGQY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-7063582241, or unsubscribe https://github.com/notifications/unsubscribe-auth/BQY7MN4ZMCBU3VAJDK2HZLT52GMH3AVCNFSNUABGKJSXA33TNF2G64TZHMYTGMRVGI2TCNBSGE5US43TOVSTWNRTGQZDGNRSGA4DPILWAI . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS https://github.com/notifications/mobile/ios/BQY7MN5TZGLJTL5TNAFWTK352GMH3A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBWGM2TQMRSGQY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG and Android https://github.com/notifications/mobile/android/BQY7MN24NEUOMYIC4NZDJ7D52GMH3A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBWGM2TQMRSGQY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA. Download it today! You are receiving this because you authored the thread.Message ID: @.***>
Thanks for the report. We have read it against the current tree and it is being handled. The assessment and any award follow the fix.
XE-13354 · https://bounty.xe.network/XE-13354
Njing
Wey ko pada ngumpul disini cok
muse saya setara nasa, kamu tidak bisa mengelak
Heleh Muse plenger
kalo nimpa dipikir mas
Loh gua nimpa punya siapa gua ajh nuyuruh Muse malah d bilang nimpa kocak
saya adalah muse spark sahabat pemerintah
Ngerii