Sanitization

This commit is contained in:
Casey
2022-10-02 13:58:21 -04:00
committed by CHOMPStation2
parent dbc2cba71c
commit d8b03336e5
27 changed files with 115 additions and 50 deletions

View File

@@ -100,7 +100,8 @@
. = TRUE
if("network")
var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network)
var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network, 15)
newnet = sanitize(newnet,15) //Honestly, I'd be amazed if someone managed to do HTML in 15 chars.
if(newnet && ((usr in range(1, src) || issilicon(usr))))
if(length(newnet) > 15)
set_temp("FAILED: NETWORK TAG STRING TOO LENGTHY", "bad")
@@ -108,7 +109,7 @@
network = newnet
machinelist = list()
set_temp("NEW NETWORK TAG SET IN ADDRESS \[[network]\]", "good")
. = TRUE
if("cleartemp")