Skip to content

Refuse map paths BlueMap would read differently (0.2.1) - #2

Merged
mgilardi merged 1 commit into
mainfrom
proxy-test
Nov 24, 2026
Merged

mgilardi merged 1 commit into
mainfrom
proxy-test

Conversation

@mgilardi

Copy link
Copy Markdown
Contributor

Security fixes from the K70 review of the map's public address. Release notes: docs/releases/v0.2.1.md.

  • Exact, case-sensitive path allowlist; any %, backslash, empty, . or .. segment is a 400, anything unlisted a 404.
  • live/markers.json answers {}; live/sse and other live paths are 404.
  • Map files sent private, no-cache; IPv6 sign-in limits keyed by /64; malformed hand-off token is a 403.
  • Live test now enables WelcomeWagon 0.6's sign-in switch, sends the review's path variants raw, and has MK_TEST_PROXY=1 to run through a throwaway Caddy with the staged site block.

Tested: 31 unit tests; bots on Paper 26.1.2 with the real BlueMap, 27/27 direct, 28/28 through Caddy, 8/8 fail closed. Not tested behind the real public address.

🤖 Generated with Claude Code

A review of the map's public address found that a signed-in player could reach a hidden map and its live player list by encoding a letter, adding /./ or changing capitals, because BlueMap decodes and tidies paths and the Mac's disk ignores case. Requests are now matched against an exact, case-sensitive list; any percent-encoding or dot segment is refused. Live markers answer empty and the live event stream isn't passed on. Map files are no longer cached, sign-in tries from IPv6 count per /64, and a malformed hand-off is a 403.

Tested: 31 unit tests; bots on throwaway Paper 26.1.2 with the real BlueMap, 27/27 direct, 28/28 through a local Caddy running the staged map site block, 8/8 fail closed. Not yet tested behind the real public address.

Task: K70
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mgilardi
mgilardi merged commit c9280ee into main Nov 24, 2026
2 checks passed
@mgilardi
mgilardi deleted the proxy-test branch November 24, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant