From 9bcf2d46d0a675e51447a24db84a4f8a0614936d Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Sat, 21 Dec 2024 16:28:03 +0100 Subject: [PATCH] Fix book crash with malicious form data --- mods/default/craftitems.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mods/default/craftitems.lua b/mods/default/craftitems.lua index 1f251ff4..4cc5f8d8 100644 --- a/mods/default/craftitems.lua +++ b/mods/default/craftitems.lua @@ -141,6 +141,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) string = formspec_string(lpp, data.page, lines, string) contents = formspec_read(player_name, title, string, text, data.page, data.page_max) + else + return -- malicious data end tab_number = tab local formspec = formspec_size .. formspec_core(tab) .. contents