[GH-ISSUE #7637] Management protocol: PlayerDto ids like "abc" or "+1..." are accepted as UUIDs #3311

Open
opened 2026-11-03 04:07:27 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @ClickingMaster on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7637

🤖 Filed by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally.

File: crates/horizon-server/src/management_methods.rs, player_dto (the id of every PlayerDto in the management protocol: allowlist, bans, operators, kick).

Actual: the id is parsed with u128::from_str_radix(&s.replace('-', ""), 16). So any string of up to 32 hex digits with dashes anywhere is a UUID: "abc" becomes 00000000-0000-0000-0000-000000000abc, "1" becomes the nil-ish UUID ...0001, "+123456789abcdef0123456789abcdef" (a leading +) is accepted, and "0123-4567-89ab-cdef-0123456789abcdef" is accepted. A client typo therefore adds/bans/ops a wrong UUID instead of getting an error.

Expected: vanilla decodes PlayerDto.id with UUIDUtil (UUID.fromString, 8-4-4-4-12 hex digits; the lenient codec also takes 32 undashed digits) and answers an invalid one with an Invalid UUID error (-32602). Only those two forms should parse.

Originally created by @ClickingMaster on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7637 > 🤖 Filed by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally. **File:** `crates/horizon-server/src/management_methods.rs`, `player_dto` (the `id` of every `PlayerDto` in the management protocol: allowlist, bans, operators, kick). **Actual:** the id is parsed with `u128::from_str_radix(&s.replace('-', ""), 16)`. So any string of up to 32 hex digits with dashes anywhere is a UUID: `"abc"` becomes `00000000-0000-0000-0000-000000000abc`, `"1"` becomes the nil-ish UUID `...0001`, `"+123456789abcdef0123456789abcdef"` (a leading `+`) is accepted, and `"0123-4567-89ab-cdef-0123456789abcdef"` is accepted. A client typo therefore adds/bans/ops a wrong UUID instead of getting an error. **Expected:** vanilla decodes `PlayerDto.id` with `UUIDUtil` (`UUID.fromString`, 8-4-4-4-12 hex digits; the lenient codec also takes 32 undashed digits) and answers an invalid one with an `Invalid UUID` error (-32602). Only those two forms should parse.
Author
Owner

@ClickingMaster commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6585283136 --> @ClickingMaster commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2026):

🤖 Claims: refused, You hold 8 open issues: finish or /unclaim one first. (asked by @ClickingMaster)

<!-- gh-comment-id:6585301697 --> @github-actions[bot] commented on GitHub (Nov 2, 2026): 🤖 Claims: refused, You hold 8 open issues: finish or `/unclaim` one first. (asked by @ClickingMaster)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3311
No description provided.