Releases: Meorawr/elune
Releases · Meorawr/elune
v3.1
Added
- Added the
pcallwithenv(f, env, [args...])base library function. - Added compatibility option interface. This allows toggling any potentially incompatible changes made for reference client compatibility.
- This is exposed via the debug library as
debug.getcompatopt(name)anddebug.setcompatopt(name, value). - Supported option names are currently "setfenv", "gctaint", "gcdebug", and "inerrorhandler" which - if set to 1 - will revert the changes documented below.
- This is exposed via the debug library as
Changed
- The
setfenvfunction will no longer allow replacing function environments that have a metatable with an__environmentkey to match new reference client behavior. __gcmetamethods are now invoked with a taint barrier to match new reference client behavior.- The
debugstack,debuglocals, andgetfenvfunctions will now return no results if called by__gcmetamethods. - The
debuglocalsfunction can now be called outside of an error handler. - Fixed linker errors with inlined security functions in unoptimized builds on non-Windows systems.
- Fixed a correctness issue with
secureexecuterangewhere errors in the supplied callback were incorrectly forwarded to the global error handler. - Fixed an issue with
secureexecuterangewhere the the C stack would grow each time the callback errored.
v3.0
Added
- Added a build option (
LUA_USE_FAST_MATH) to toggle the addition of floating point optimization compiler flags, which have been removed from the presets. This is enabled by default. - Added a new
nparameter tolua_cleartaintwhich will clear the taint off the topnstack variables. - Added a backport of
luaL_tolstringfrom Lua 5.2.
Changed
- Fixed a few issues with the
bit.*library functions. - Required CMake version is now 3.24.
- CMake will now consult find_package modules to search for dependency libraries before falling back to acquiring them via FetchContent.
Removed
- Removed
lua_istaintexpected. This API was effectively non-functional when called by C due to the internals of taint and would always return 1.
v2.2
Added
- Added
debuglocals([level])library API. - Added
debugstack([thread, ][level, ntop, nbase, ...])library API. - Added
strsplittable(delim, str[, limit])library API. - Added support for object name replacements in handled errors.
Changed
- Fixed an issue where
secureexecuterange()would not pass through additional arguments to the supplied function. - Fixed an issue where
strsplit()would ignore the value supplied to thelimitparameter. - Fixed various correctness issues with
strsplit()and processing of parameters with embedded null characters.
v2.1
Changed
- The
lua_Clocktypedef is now anint64_tto work around issues on 32-bit platforms. - Fixed a bug with
table.concatandunpackusing an incorrect default value for the optionaljparameter.
v2.0
Added
- Reimplemented taint propagation from the ground-up, fixing a large amount of bugs and unimplemented aspects particularly around coroutines.
- Added C and Lua APIs for creating and testing C closures.
- Added C and Lua APIs for profiling and memory measurement.
- Added C and Lua APIs for high-precision timers.
- Added C and Lua APIs for querying and manipulating taint.
- Added C and Lua APIs for secure random number generation.
- Added support for the
__environmentmetatable key togetfenv. - Added a
-pflag to the interpreter to enable performance accounting. - Added a
-tflag to the interpreter to run inline scripts (-e) or load files insecurely.- When this flag is specified, any modules loaded via
-lwill still be loaded securely.
- When this flag is specified, any modules loaded via
Changed
- Build process now requires CMake 3.22 and makes use of CMake presets for common build targets. See README for more information.
Removed
- Removed the taint field on the
lua_Debugto fix potential binary incompatibilities. - Removed the
"s"field fromdebug.getinfo. Usedebug.getstacktaint()instead. - Removed
debug.forcesecure(). Usedebug.setstacktaint(nil)instead.
tainted-lua v1
tainted-lua v1
Added
- Added basic taint propagation system.
- Added the following security extensions to the base library:
forceinsecure()geterrorhandler()hooksecurefunc([table,] "name", func)issecure()issecurevariable([table,] "variable")scrub(...)seterrorhandler(errfunc)
- Added the following security extensions to the debug library:
debug.forcesecure()
- Added a new hook mask (
"s") which is invoked whenever the VM transitions between security states. This occurs after processing of the current instruction. - Added a debug trap system that allows configuring errors under certain runtime conditions.
- This can be controlled through the
debug.settrapmask("mask")anddebug.gettrapmask()functions. - The
"s"mask enables integer overflow errors instring.formatfalls for signed format specifiers. - The
"u"mask enables integer overflow errors instring.formatcalls for unsigned format specifiers. - The
"z"mask enables divide-by-zero errors for division and modulo operations. - The default trap mask matches that of a live retail client environment and is set to
"s".
- This can be controlled through the
- Added all string library extensions present in the in-game environment as well as their global aliases.
- Added all table library extensions present in the in-game environment as well as their global aliases.
- Added all math library extensions present in the in-game environment as well as their global aliases.
- Added all global aliases to the OS libary functions as present in the in-game environment.