Skip to content

Commit 9bcf2d4

Browse files
committed
Fix book crash with malicious form data
1 parent f4f3659 commit 9bcf2d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mods/default/craftitems.lua

+2
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
141141
string = formspec_string(lpp, data.page, lines, string)
142142
contents = formspec_read(player_name, title, string,
143143
text, data.page, data.page_max)
144+
else
145+
return -- malicious data
144146
end
145147
tab_number = tab
146148
local formspec = formspec_size .. formspec_core(tab) .. contents

0 commit comments

Comments
 (0)