mirror of
https://github.com/minetest/minetest.git
synced 2025-07-01 15:40:23 +02:00
Don't let HTTP API pass through untrusted function
This has been a problem since the first day, oops.
This commit is contained in:
@ -250,7 +250,7 @@ end
|
||||
|
||||
-- HTTP callback interface
|
||||
|
||||
function core.http_add_fetch(httpenv)
|
||||
core.set_http_api_lua(function(httpenv)
|
||||
httpenv.fetch = function(req, callback)
|
||||
local handle = httpenv.fetch_async(req)
|
||||
|
||||
@ -266,7 +266,8 @@ function core.http_add_fetch(httpenv)
|
||||
end
|
||||
|
||||
return httpenv
|
||||
end
|
||||
end)
|
||||
core.set_http_api_lua = nil
|
||||
|
||||
|
||||
function core.close_formspec(player_name, formname)
|
||||
|
Reference in New Issue
Block a user