Skip to content
New issue

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

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

Already on GitHub? # to your account

Prevent IndexOutOfBoundsException in interaction replies #4690

Merged
merged 1 commit into from
Dec 15, 2021

Conversation

mdcfe
Copy link
Member

@mdcfe mdcfe commented Dec 15, 2021

Information

This PR fixes an issue introduced by #4686 and reported on Discord.

Details

Proposed fix:

Check the maximum length of a command reply before trying to substring it.

Environments tested:

OS: TODO @JRoy

Java version: TODO @JRoy

  • Most recent Paper version (1.18.1, git-Paper-BUILD) TODO @JRoy
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

@mdcfe mdcfe added type: bugfix PRs that fix bugs in EssentialsX. module: discord Issues or PRs for the EssentialsDiscord module labels Dec 15, 2021
@mdcfe mdcfe added this to the 2.19.2 milestone Dec 15, 2021
@mdcfe mdcfe requested a review from JRoy December 15, 2021 14:36
@mdcfe mdcfe marked this pull request as ready for review December 15, 2021 14:37
Copy link
Member

@JRoy JRoy left a comment

Choose a reason for hiding this comment

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

Minor amounts of trolling

@mdcfe mdcfe merged commit de4fd9f into dev/2.19.2 Dec 15, 2021
@mdcfe mdcfe deleted the fix/discord-interact-reply-limit branch December 15, 2021 20:02
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
module: discord Issues or PRs for the EssentialsDiscord module type: bugfix PRs that fix bugs in EssentialsX.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants