fix: guard IPv6 login bucket parse so one login can't crash the world#114
Closed
ejtriple wants to merge 1 commit into
Closed
fix: guard IPv6 login bucket parse so one login can't crash the world#114ejtriple wants to merge 1 commit into
ejtriple wants to merge 1 commit into
Conversation
ejtriple
force-pushed
the
fix/ipv6-login-crash
branch
from
July 17, 2026 17:01
5eea759 to
4ada9ff
Compare
`::` zero-compression can leave hextets[2] empty, so parseInt returns NaN and BigInt(NaN) throws in the unguarded processLogins() loop, unwinding to the cycle() catch that drops all players and exits. Fall back to bucket 0; valid addresses unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ejtriple
force-pushed
the
fix/ipv6-login-crash
branch
from
July 17, 2026 17:02
4ada9ff to
2c98428
Compare
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.
A single IPv6 login crashes the whole world.
World.processLogins()buckets players by address; the IPv6 branch doesparseInt(hextets[2], 16) % 256. With::zero-compression that group is usually empty (2001:db8::1→['2001','db8','','1']), soparseIntisNaNandBigInt(NaN)throws. The login loop is unguarded, so it unwinds to thecycle()catch, which removes every player andprocess.exit(1)s. That path also never notifies the friends server, so those players stay "already logged in" until their sessions expire.Fix: fall back to bucket 0 for an empty/non-hex group. Valid addresses are unchanged (
2001:4860:4860::8888→ 96,fe80::1→ 1).