mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 16:44:43 +01:00
[MIRROR] [s] Sanitizes modular console ID edits (#3074)
* [s] Sanitizes modular console ID edits (#56657) Co-authored-by: Mothblocks <35135081+Jared-Fogle@ users.noreply.github.com> * [s] Sanitizes modular console ID edits Co-authored-by: silicons <2003111+silicons@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Jared-Fogle@ users.noreply.github.com>
This commit is contained in:
@@ -177,7 +177,7 @@
|
||||
if("PRG_edit")
|
||||
if(!computer || !authenticated || !target_id_card)
|
||||
return
|
||||
var/new_name = params["name"]
|
||||
var/new_name = reject_bad_name(params["name"]) // if reject bad name fails, the edit will just not go through instead of discarding all input, as new_name would be blank.
|
||||
if(!new_name)
|
||||
return
|
||||
target_id_card.registered_name = new_name
|
||||
@@ -192,7 +192,7 @@
|
||||
return
|
||||
|
||||
if(target == "Custom")
|
||||
var/custom_name = params["custom_name"]
|
||||
var/custom_name = reject_bad_name(params["custom_name"]) // if reject bad name fails, the edit will just not go through, as custom_name would be empty
|
||||
if(custom_name)
|
||||
target_id_card.assignment = custom_name
|
||||
target_id_card.update_label()
|
||||
|
||||
Reference in New Issue
Block a user