Limit chatcommand parameter length in command blocks #695
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.