Disallow LCD messages that aren't strings or numbers (#89)

This commit is contained in:
cheapie 2024-09-09 14:08:39 -05:00 committed by GitHub
parent 7c343b0ce1
commit 7d4895d5d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -259,6 +259,8 @@ local on_digiline_receive = function(pos, _, channel, msg)
local setchan = meta:get_string("channel") local setchan = meta:get_string("channel")
if setchan ~= channel then return end if setchan ~= channel then return end
if type(msg) ~= "string" and type(msg) ~= "number" then return end
meta:set_string("text", msg) meta:set_string("text", msg)
meta:set_string("infotext", msg) meta:set_string("infotext", msg)