mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-03-15 04:11:24 +00:00
Fix book crash with malicious form data
This commit is contained in:
parent
f4f365970a
commit
9bcf2d46d0
1 changed files with 2 additions and 0 deletions
|
@ -141,6 +141,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
string = formspec_string(lpp, data.page, lines, string)
|
string = formspec_string(lpp, data.page, lines, string)
|
||||||
contents = formspec_read(player_name, title, string,
|
contents = formspec_read(player_name, title, string,
|
||||||
text, data.page, data.page_max)
|
text, data.page, data.page_max)
|
||||||
|
else
|
||||||
|
return -- malicious data
|
||||||
end
|
end
|
||||||
tab_number = tab
|
tab_number = tab
|
||||||
local formspec = formspec_size .. formspec_core(tab) .. contents
|
local formspec = formspec_size .. formspec_core(tab) .. contents
|
||||||
|
|
Loading…
Add table
Reference in a new issue