

- #STONEHEARTH MULTIPLAYER AUTHENTICATION TIMED OUT MOD#
- #STONEHEARTH MULTIPLAYER AUTHENTICATION TIMED OUT PATCH#
- #STONEHEARTH MULTIPLAYER AUTHENTICATION TIMED OUT MODS#
This is inherently unsafer than just any mod, because if I have messed up somewhere, bad people could do bad things. By allowing outgoing requests, we’re breaking the sandbox. Lua itself is a sandbox (let’s ignore the fact that Lua has native support for binary modules), especially in games. You might ask now, isn’t this kind of insecure? Well, yes, it is! There’s a good reason that Stonehearth doesn’t allow HTTP connections out of the box. Turns out, those have already been removed as part of the multiplayer update, so they’re gone… twice now, I suppose? On the topic of Security To be able to actually use it, I’m hitchhiking on some other calls that Stonehearth necessarily needs to make in order for Lua to work.Īdditionally, I’ve removed several bits that could be used to do bad things, such as the io and debug library. To top it off, there’s a proprietary (read: not the one SH uses) JSON parser included to parse the whitelist. My patched DLL comes with a HTTP client that can open HTTP and HTTPS connections (technically, FTP, SFTP and whatever else curl offers would be possible, too, but for safety reasons, only HTTP is enabled for the time being), as well as lua bindings for it. In fact, there is a one-in-a-million chance that it actually runs somewhat (probably in the unobservable realm) smoother, as I’ve fixed one (1!) undefined behaviour that happened in one of the patches, but that’s mostly just semantics. Thankfully helped me here and there with a few missing functions, so that overall the dll should do mostly the same. It’s built completely from scratch, as I had no access to Stonehearth’s original Lua sources. What’s different in this Lua dll of yours? Keeping a backup of the original files is recommended if you wish to go back to the official Lua.
#STONEHEARTH MULTIPLAYER AUTHENTICATION TIMED OUT MODS#
Simply copy the content of the zip over your base game directory - not your mods folder! If done properly, Windows should ask you to overwrite lua-5.1.5.dll twice.
#STONEHEARTH MULTIPLAYER AUTHENTICATION TIMED OUT MOD#
Included is everything you need to get started: The two patched lua-5.1.5.dlls and an example mod that loads the latest topics from this Discourse, sends it to the GUI, and displays them there along with the avatars of the last posters. Logger:error('Could not fetch %s: HTTP status %d, error %s', ctx:get_url(), ctx:get_status_code() ctx:get_error()) As example, let's get the response content: Feel free to do whatever you want in here.

Using HHH is pretty straight forward with the included a: local http = require 'httplib' This allows the game to interact with web services, because we all know HTTP and the cloud are the future.
#STONEHEARTH MULTIPLAYER AUTHENTICATION TIMED OUT PATCH#
HHH is a patch for Lua that allows Stonehearth mods to do HTTP calls to remote endpoints. I regret to announce that this is not the case, as instead I come tonight to bring you the codified recreation of the end of the world. I understand that you have come tonight to bear witness to my journey on an insane path of monkey-patching Lua.
