Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash of moderation bot for invalid nicknames #51

Merged
merged 1 commit into from
Jan 20, 2025

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