HUD/mcl_inventory: Fix creative mode inventory search crash #237
No reviewers
Labels
No Label
blocker
bug
code quality
confirmed
critical
discussion
high priority
incompatibility
incomplete feature
invalid
low priority
missing feauture
needs testing
packet spam
performance
project
regression
translations
unconfirmed
in review
ready for review
No Milestone
No project
No Assignees
2 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Mineclonia/Mineclonia#237
Loading…
Reference in New Issue
No description provided.
Delete Branch "fix-creative-inventory-crash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
TRACKING ISSUE: #235
Before this patch it was possible for any user to to crash Minetest in
creative mode. This was possible because queries in the search field
were interpreted as search patterns for string.find().
A search for a single square bracket would reliably crash the server.
Also, a search for 6000 times the string “a?” would hang the server.
Solution
The solution to both bugs is to not interpret the query as a pattern.
Details
http://www.lua.org/manual/5.1/manual.html#pdf-string.find says:
Testing Steps
Verify Bug
23f1c51912
in creative mode.[
.]
character.Verify Patch
f975055464
in creative mode.[
.my testing concludes that this PR does indeed fix the
[
crash. besides that, the search results seem unchanged.