Repository navigation
fix(guild): check the password on kick when no security code is set - #1237
Merged
Merged
Conversation
Account.SecurityCode defaults to "" (not null), so 'SecurityCode != null' was always true and the check always ran against an empty string that no player input could match - there's no in-game or web flow to set a security code either. Now mirrors DeleteCharacterAction's fallback: with no security code configured, the account password is checked instead. The entered and the stored code are no longer written to the debug log. Split out of #995. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uz47mrsSwm3hxZc7gCMxd9
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.
Split out of #995 (original commit by @OviedoMarcelo, authorship kept).
Problem
Account.SecurityCodedefaults to"", notnull, so the check inGuildKickPlayerActionalways compared the input against an empty string. No input can match that, and there's no in-game or web flow to set a security code. As a result, a guild master could never kick a member, and also couldn't disband the guild, because disbanding is a self-kick.
Change
DeleteCharacterAction: if no security code is set, the input is checked against the account password (BCrypt). Otherwise it's checked against the security code.GuildActionTest:Testing
dotnet test tests/MUnique.OpenMU.Tests --filter GuildActionTest: 32/32 passed.GuildKickPlayerAction,GuildKickWithPasswordWhenNoSecurityCodeIsSetAsyncfails, as expected.Generated by Claude Code