Fix vulnerability by checking privs in formspec callback
parent
701ec1f060
commit
18a803c9a9
4
gui.lua
4
gui.lua
|
@ -37,6 +37,10 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not minetest.check_player_privs(player, "privs") then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
if fields.submit then
|
if fields.submit then
|
||||||
-- Do addition stuff
|
-- Do addition stuff
|
||||||
print("submitting")
|
print("submitting")
|
||||||
|
|
Loading…
Reference in New Issue