mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 20:17:15 +01:00
RCON Sanitization
- Makes RCON tags less exploitable.
This commit is contained in:
@@ -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>")
|
||||
|
||||
@@ -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>")
|
||||
|
||||
Reference in New Issue
Block a user