RCON Sanitization

- Makes RCON tags less exploitable.
This commit is contained in:
C.L
2022-09-29 21:14:39 -04:00
parent 74fecd3358
commit 39ef5899f2
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -40,7 +40,7 @@
/obj/machinery/power/breakerbox/activated/Initialize()
. = ..()
return INITIALIZE_HINT_LATELOAD
/obj/machinery/power/breakerbox/activated/LateInitialize()
set_state(1)
@@ -96,7 +96,8 @@
/obj/machinery/power/breakerbox/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/device/multitool))
var/newtag = tgui_input_text(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system")
var/newtag = tgui_input_text(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system", "", MAX_NAME_LEN)
newtag = sanitize(newtag,MAX_NAME_LEN)
if(newtag)
RCon_tag = newtag
to_chat(user, "<span class='notice'>You changed the RCON tag to: [newtag]</span>")
+2 -1
View File
@@ -312,7 +312,8 @@
// Multitool - change RCON tag
if(istype(W, /obj/item/device/multitool))
var/newtag = tgui_input_text(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system")
var/newtag = tgui_input_text(user, "Enter new RCON tag. Use \"NO_TAG\" to disable RCON or leave empty to cancel.", "SMES RCON system", "", MAX_NAME_LEN)
newtag = sanitize(newtag,MAX_NAME_LEN)
if(newtag)
RCon_tag = newtag
to_chat(user, "<span class='notice'>You changed the RCON tag to: [newtag]</span>")