Skip to content

Conversation

Dunedan
Copy link
Collaborator

@Dunedan Dunedan commented Jan 15, 2025

When invoking the moderation bot with a command targeting a user with an invalid invalid nickname, containing characters not allowed as local part of a JID, the bot would throw an unhandled exception. This would for example happen when copy & pasting such nicknames, while they were surrounded by unprintable Unicode character. To fix this, this commit strips all unprintable characters from the provided nickname and prints an error if it's then still not a valid local part of a JID.

When invoking the moderation bot with a command targeting a user
with an invalid invalid nickname, containing characters not allowed as
local part of a JID, the bot would throw an unhandled exception. This
would for example happen when copy & pasting such nicknames, while they
were surrounded by unprintable Unicode character. To fix this, this
commit strips all unprintable characters from the provided nickname and
prints an error if it's then still not a valid local part of a JID.
@Dunedan Dunedan merged commit f0f5a84 into 0ad:master Jan 20, 2025
4 checks passed
@Dunedan Dunedan deleted the fix-crash-on-invalid-nicknames branch January 20, 2025 06:58
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