Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for digiline message field type #670

Merged

Conversation

Emojigit
Copy link
Member

This PR fixes a fatal error: if a malformed digiline table is passed into a node detector, the server may crash because of a mismatched data type.

For example, this weird backtrace happened because technic is sending "malformed" tables:

ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback node_on_timer(): $HOME/.minetest/mods/mesecons/mesecons_detector/init.lua:63: bad argument #2 to 'set_string' (string expected, got table)
ERROR[Main]: stack traceback:
ERROR[Main]:       [C]: in function 'set_string'
ERROR[Main]:       $HOME/.minetest/mods/mesecons/mesecons_detector/init.lua:63: in function 'action'
ERROR[Main]:       $HOME/.minetest/mods/digicontrol/override.lua:45: in function 'transmit'
ERROR[Main]:       $HOME/.minetest/mods/digicontrol/override.lua:78: in function 'receptor_send'
ERROR[Main]:       ...test/mods/technic/technic/machines/switching_station.lua:112: in function <...test/mods/technic/technic/machines/switching_station.lua:87>

@Niklp09
Copy link
Member

Niklp09 commented Jul 1, 2024

@Emojigit bump.

@Emojigit Emojigit requested a review from SmallJoker July 1, 2024 21:56
@sfan5 sfan5 merged commit 0c7bb31 into minetest-mods:master Jul 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants