Age | Commit message (Collapse) | Author |
|
Restrict maximum length of messages to 50.000 characters and disable sending functions or table references over the wire. Restrict types of channel variable to string, number or boolean.
The missing length restriction made DoS-like attacks possible by overflowing memory using string concatenation. Thanks to gamemanj for disclosing this issue.
|
|
|
|
protection is ignored with protection_bypass_priv
|
|
|
|
Disabling LuaJIT for user code enables normal working of debug.sethook() even for loops. The drawback is that that code will run more slowly.
The fourth parameter of string.find indicates whether the second parameter should be interpreted literally (true) or as a pattern (false). Allowing patterns enables DoS attacks, but it's possible to
allow literal matching with little effort, by disallowing the function only if the fourth parameter (plain mode) is not `true`.
|
|
|
|
fixes #255
|
|
prohibited, remove pcall and xpcall, fix global lookup of "jit"
variable, correct error locations
Thanks to @ShadowNinja and @gamemanj for fixing this in #241
|
|
|
|
default, fixes #240
If size limit is exceeded, the luacontroller overheats. Overheating will cause the memory
to be erased.
|
|
|
|
|
|
I hope this doesn't break anyone's setup.
|
|
nil value)
|
|
However, without the print_count limiting functionality
Conflicts:
mesecons_luacontroller/init.lua
|
|
|
|
|
|
https://github.com/ShadowNinja/minetest-mod-mesecons into ShadowNinja-improve-luacontroller
Conflicts:
mesecons/legacy.lua
mesecons_luacontroller/init.lua
mesecons_microcontroller/init.lua
|
|
Settings can now be retrieved by mesecon.setting(<name>, <default>) and can be modified without
editing the source code by adding the setting to minetest.conf
For instance, you can add mesecon.blinky_plant_interval = 0.5 to minetest.conf in order to
increase the blinking speed.
Rewrite the blinky plant with nodetimers.
Fixes #161
|
|
flexibility and because it was never inteded to be OOP in the first
place.
mesecon.receptor_on and mesecon.receptor_off are provided by wrappers
(mesecon:receptor_on/off) for compatibility, but will be removed. Mod
programmers that use mesecons: Please update!
Also, fix microcontroller polluting the global namespace and remove some
deprecated stuff.
|
|
This may also bring some performance benefit.
|
|
Just some minor issues like dead code.
|
|
Changes:
* Stops code after a certain number of instructions.
* Allows functions, due to instruction counting.
* Allows loops and goto with non-JIT Lua (LuaJIT doesn't count looping as an instruction, allowing infinite loops), due to instruction counting.
* Removes string matching functions as they can be slow.
* Adds some safe functions.
* Limits the amount of printing that can be done (to prevent console flooding).
* Code cleanup.
* More...
|
|
more than 20 actions per second on lua- / microcontrollers and gates.
Fix a bug where a burnt luacontroller didn't have the correct pin-states as the burnt controller does not register any changes from outside.
|
|
Why did we actually put the update action in a queue again? Whatever issue it that was for, I couldn't reproduce it.
Propably the ActionQueue fixed that...?
|
|
so that it will keep working when restarting the server
|
|
|
|
https://github.com/CiaranG/minetest-mod-mesecons into CiaranG-digiline-non-reentrant
Conflicts:
mesecons_luacontroller/init.lua
|
|
Add timer() function/event (node timer based) to luacontroller
|
|
This adds a timer(<seconds>) function, which causes an event of type
"timer" to be fired after that many seconds has elapsed.
Because it's node timer based, it works properly across server restarts
and block unloading. Thus, simplest example, a blinky plant replacement
with a 10 second period:
if event.type == "program" then
timer(10)
elseif event.type == "timer" then
port.a = not port.a
timer(10)
end
|
|
Example of problem fixed by this: Edit lua code, press Execute. Now
(execute button has focus), hold down a key. Zillions of "program"
events are generated.
|
|
In the same way as for port settings, this queues up digiline messages
sent during the luacontroller's execution, and sends them afterwards.
This solves many problems, but one example:
1. Send a message, and receive a reply from another device.
2. While handling the reply event (effectively a nested invocation
on the same luacontroller) make a change to memory
3. Notice that the memory change has no effect, because after
completion of the reply handling, it stores the memory, but then
the original invocation completes and overwrites it with it's
own earlier copy of the same memory.
|
|
|
|
|
|
|
|
|
|
here and there to facilitate this.
|
|
Multi rules
Merged for near-future textures to be merged cleanly.
|
|
|
|
|
|
|
|
goto statement (bugs reported by Nore).
|
|
|
|
cooled normally if they are moved (piston, etc...) during the cooling delay.
|
|
|
|
and prevent interrupts from piling up (fixes #101, metadata trashing). Idea for burnt luacontroller comes from ShadowNinja.
|
|
|
|
|
|
|
|
get out of the sandbox.
|