Skip to content

Fix guild invite acceptance handling#227

Open
Koaio wants to merge 4 commits into
masterfrom
fix/guild-invite-acceptance
Open

Fix guild invite acceptance handling#227
Koaio wants to merge 4 commits into
masterfrom
fix/guild-invite-acceptance

Conversation

@Koaio

@Koaio Koaio commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Validate character/guild UIDs and pending invites before joining, and update character guildUid only after successful guild membership.

Validate character/guild UIDs and pending invites before joining, and update character guildUid only after successful guild membership.
@Koaio Koaio requested review from rgnter and xen1i March 12, 2026 04:17
@rgnter rgnter requested a review from SergeantSerk March 12, 2026 09:07

@Koaio Koaio left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me we can merge

@xen1i xen1i removed their request for review March 17, 2026 06:49

const auto& clientContext = GetClientContext(clientId);

// Basic sanity check: command character must match connected character

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Basic sanity check: command character must match connected character
// Sanity check the requested character matches the client character.

const auto& clientContext = GetClientContext(clientId);

// Basic sanity check: command character must match connected character
if (command.characterUid != clientContext.characterUid)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

characterUid is the UID of the character that is being invited, you should be checking inviterCharacterName. Can you please test the behaviour in the future before submitting PRs?


// Check that the guild instance exists in lobby state
auto& guildInstances = _serverInstance.GetLobbyDirector().GetGuilds();
const auto guildInstanceIt = guildInstances.find(command.guild.uid);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to verify the command.guild.uid as well.

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.

2 participants