Add Lua interface to HTTPFetchRequest
authorJeija <norrepli@gmail.com>
Thu, 18 Feb 2016 10:38:47 +0000 (11:38 +0100)
committerest31 <MTest31@outlook.com>
Mon, 22 Feb 2016 14:39:41 +0000 (15:39 +0100)
commit31e0667a4a53a238d0321194b57b083bd74c0a5b
tree24c049c95a08b82f45dcde77419f50ee3a00639f
parenta3892f5a6632550bf0c14c18e6902f6ae06bb567
Add Lua interface to HTTPFetchRequest

This allows mods to perform both asynchronous and synchronous HTTP
requests. Mods are only granted access to HTTP APIs if either mod
security is disabled or if they are whitelisted in any of the
the secure.http_mods and secure.trusted_mods settings.

Adds httpfetch_caller_alloc_secure to generate random, non-predictable
caller IDs so that lua mods cannot spy on each others HTTP queries.
12 files changed:
builtin/game/misc.lua
builtin/settingtypes.txt
doc/lua_api.txt
src/defaultsettings.cpp
src/httpfetch.cpp
src/httpfetch.h
src/script/common/c_converter.cpp
src/script/common/c_converter.h
src/script/lua_api/CMakeLists.txt
src/script/lua_api/l_http.cpp [new file with mode: 0644]
src/script/lua_api/l_http.h [new file with mode: 0644]
src/script/scripting_game.cpp