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

@@ -157,7 +157,8 @@ GLOBAL_LIST_EMPTY(all_waypoints)
switch(action)
if("add")
var/datum/computer_file/data/waypoint/R = new()
var/sec_name = tgui_input_text(usr, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]")
var/sec_name = tgui_input_text(usr, "Input navigation entry name", "New navigation entry", "Sector #[known_sectors.len]", MAX_NAME_LEN)
sec_name = sanitize(sec_name,MAX_NAME_LEN)
if(tgui_status(usr, state) != STATUS_INTERACTIVE)
return FALSE
if(!sec_name)
@@ -244,7 +245,7 @@ GLOBAL_LIST_EMPTY(all_waypoints)
else
autopilot = !autopilot
. = TRUE
if("apilot_lock")
autopilot_disabled = !autopilot_disabled
autopilot = FALSE