Repository navigation
fix(postbox): bound hand-delivery flood, gate dismantle, stop book dup - #4
Merged
Merged
Conversation
Deep-review abuse findings (gmc101 public offline-mode server): - DoS: the queue cap only applied to posted mail (!handDelivery), but hand delivery lands straight in the recipient's inbox (which pendingCountFor counts) for free with no cap — so a self-addressed or hijacked-session hand delivery could flood any player's box without bound. The cap now covers hand delivery too (legit drops still work until the box is full). - Griefing: mailbox dismantle ran on PlayerBlockBreakEvents.AFTER for ANY player who broke the end rod — letting anyone destroy someone else's mailbox, harvest the rare Rainbow Mailbox head, and dump their mail. Moved to BEFORE and vetoed unless the breaker owns the box (or is a creative-mode admin). - Dup: a held-book send did held.copy() (whole stack) but only shrink(1) from the hand, so mailing from a stack of written books duplicated the rest. The mailed letter is now normalized to a single book (setCount(1)). Verified: gradlew build (compile + tests + spotless) green.
k33bz
marked this pull request as ready for review
July 14, 2026 13:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bound hand-delivery flood, gate dismantle, stop written-book dup
Confirmed deep-review abuse findings (gmc101 is public + offline-mode):
!handDelivery), but hand delivery lands straight in the recipient's inbox — whichpendingCountForcounts — for free with no cap. A self-addressed or hijacked-session hand delivery could flood any player's box without bound. The cap now covers hand delivery too; legit drops still work until the box is actually full.PlayerBlockBreakEvents.AFTERfor any player who broke the end rod, so anyone could destroy someone else's mailbox, harvest the rare Rainbow Mailbox head, and dump their mail. Moved toBEFOREand vetoed unless the breaker owns the box (or is a creative-mode admin — the mod's own privilege idiom).held.copy()(the whole stack) but onlyshrink(1)from the hand, so mailing from a stack of identical written books duplicated the rest. The mailed letter is normalized to a single book (setCount(1)).Verified:
./gradlew build(compile + tests + spotless) green.Draft — deep-review abuse fixes, opened for your review.