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

Limit chatcommand parameter length in command blocks #695

Merged
merged 2 commits into from
Dec 22, 2024

Conversation

luk3yx
Copy link
Contributor

@luk3yx luk3yx commented Dec 20, 2024

This PR adds a configurable maximum length for chatcommand parameters. Long parameters can possibly be used to cause crashes and other problems since mods don't expect parameters to be very long.

Hopefully the default of 10,000 bytes won't break any existing command blocks.

This issue this PR aims to fix is somewhat mitigated by the formspec input length limit and minetest/minetest@9c9309c (introduced in 5.7.0), however other mods (like irc) don't have a message size limit, though a 10 kB message will probably do just as much harm, server owners would have to configure the limit if they can live with some command blocks no longer working.

Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

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

looks good

Co-authored-by: SmallJoker <[email protected]>
@sfan5 sfan5 merged commit 320ec93 into minetest-mods:master Dec 22, 2024
4 checks passed
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.

3 participants