diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index c00bb17b1d..918fee1389 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -311,7 +311,7 @@ Turf and target are seperate in case you want to teleport some distance from a t newname = input(src,"You are a [role]. Would you like to change your name to something else?", "Name change",oldname) as text if((world.time-time_passed)>300) return //took too long - newname = reject_bad_name(newname,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters. + newname = sanitizeName(newname, ,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters. for(var/mob/living/M in player_list) if(M == src) diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index d3aef96c45..3e5454d8ac 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -36,8 +36,8 @@ var/tmp/message_title = new_title ? new_title : title var/tmp/message_sound = new_sound ? sound(new_sound) : sound - message = trim_strip_html_properly(message) - message_title = html_encode(message_title) + message = sanitize(message, extra = 0) + message_title = sanitizeSafe(message_title) Message(message, message_title) if(do_newscast) diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 066604834e..703ce04828 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -697,7 +697,7 @@ var/list/datum/dna/hivemind_bank = list() src << "We return our vocal glands to their original location." return - var/mimic_voice = stripped_input(usr, "Enter a name to mimic.", "Mimic Voice", null, MAX_NAME_LEN) + var/mimic_voice = sanitize(input(usr, "Enter a name to mimic.", "Mimic Voice", null), MAX_NAME_LEN) if(!mimic_voice) return diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index b4b5ae4d51..511f86f7d5 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -564,7 +564,7 @@ var/list/sacrificed = list() // returns 0 if the rune is not used. returns 1 if the rune is used. communicate() . = 1 // Default output is 1. If the rune is deleted it will return 1 - var/input = stripped_input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") + var/input = sanitize(input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")) if(!input) if (istype(src)) fizzle() diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm index f4d9dd0c59..4dcb838152 100644 --- a/code/game/machinery/bots/cleanbot.dm +++ b/code/game/machinery/bots/cleanbot.dm @@ -355,7 +355,7 @@ text("[src.oddbutton ? "Yes" : "No" del(src) else if (istype(W, /obj/item/weapon/pen)) - var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN) + var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN) if (!t) return if (!in_range(src, usr) && src.loc != usr) diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index 639da55bf5..f225b9ce8d 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -58,7 +58,7 @@ ..() if(istype(W, /obj/item/weapon/pen)) - var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN) + var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN) if(!t) return if(!in_range(src, usr) && src.loc != usr) return created_name = t diff --git a/code/game/machinery/bots/floorbot.dm b/code/game/machinery/bots/floorbot.dm index 54c8390234..b3c1c0376f 100644 --- a/code/game/machinery/bots/floorbot.dm +++ b/code/game/machinery/bots/floorbot.dm @@ -420,7 +420,7 @@ del(src) else if (istype(W, /obj/item/weapon/pen)) - var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN) + var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN) if (!t) return if (!in_range(src, usr) && src.loc != usr) @@ -439,7 +439,7 @@ user.drop_from_inventory(src) del(src) else if (istype(W, /obj/item/weapon/pen)) - var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name) + var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN) if (!t) return diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm index fbcb7d448e..8ce3522707 100644 --- a/code/game/machinery/bots/medbot.dm +++ b/code/game/machinery/bots/medbot.dm @@ -564,7 +564,7 @@ /obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() if(istype(W, /obj/item/weapon/pen)) - var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN) + var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN) if (!t) return if (!in_range(src, usr) && src.loc != usr) diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm index f1283e5efc..92b7297c42 100644 --- a/code/game/machinery/bots/secbot.dm +++ b/code/game/machinery/bots/secbot.dm @@ -838,7 +838,7 @@ Auto Patrol: []"}, del(src) else if(istype(W, /obj/item/weapon/pen)) - var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN) + var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN) if(!t) return if(!in_range(src, usr) && src.loc != usr) diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 4ece6594f0..a038ece414 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -78,7 +78,7 @@ if(isscrewdriver(W)) playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - var/input = strip_html(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13")) + var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13")) if(!input) usr << "No input found please hang up and try your call again." return @@ -90,7 +90,7 @@ var/area/camera_area = get_area(src) var/temptag = "[sanitize(camera_area.name)] ([rand(1, 999)])" - input = strip_html(input(usr, "How would you like to name the camera?", "Set Camera Name", temptag)) + input = sanitizeSafe(input(usr, "How would you like to name the camera?", "Set Camera Name", temptag)) state = 4 var/obj/machinery/camera/C = new(src.loc) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 53a65f65e4..4e97506088 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -222,7 +222,7 @@ if (is_authenticated()) var/t2 = modify if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf))) - var/temp_name = reject_bad_name(href_list["reg"]) + var/temp_name = sanitizeName(href_list["reg"]) if(temp_name) modify.registered_name = temp_name else diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index c3e12d4a58..4015b907f9 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -187,7 +187,7 @@ if(centcomm_message_cooldown) usr << "\red Arrays recycling. Please stand by." return - var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "") + var/input = sanitize(input("Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")) if(!input || !(usr in view(1,src))) return Centcomm_announce(input, usr) @@ -204,7 +204,7 @@ if(centcomm_message_cooldown) usr << "\red Arrays recycling. Please stand by." return - var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "") + var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")) if(!input || !(usr in view(1,src))) return Syndicate_announce(input, usr) diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index 121942a418..40fc0b9914 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -114,11 +114,11 @@ if (href_list["choice"]) switch(href_list["choice"]) if ("giv_name") - var/nam = strip_html_simple(input("Person pass is issued to", "Name", giv_name) as text|null) + var/nam = sanitize(input("Person pass is issued to", "Name", giv_name) as text|null) if (nam) giv_name = nam if ("reason") - var/reas = strip_html_simple(input("Reason why pass is issued", "Reason", reason) as text|null) + var/reas = sanitize(input("Reason why pass is issued", "Reason", reason) as text|null) if(reas) reason = reas if ("duration") diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 1e4979b657..c05f0f78be 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -426,7 +426,7 @@ What a mess.*/ switch(href_list["field"]) if("name") if (istype(active1, /datum/data/record)) - var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) + var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) if (!t1 || active1 != a1) return active1.fields["name"] = t1 diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 0c93c15bfc..aa92a59094 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -309,7 +309,7 @@ What a mess.*/ switch(href_list["field"]) if("name") if (istype(active1, /datum/data/record)) - var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) + var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1) return active1.fields["name"] = t1 diff --git a/code/game/machinery/computer3/computers/communications.dm b/code/game/machinery/computer3/computers/communications.dm index c8548bb933..f00b595c6c 100644 --- a/code/game/machinery/computer3/computers/communications.dm +++ b/code/game/machinery/computer3/computers/communications.dm @@ -192,7 +192,7 @@ if(centcomm_message_cooldown) usr << "Arrays recycling. Please stand by." return - var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") + var/input = sanitize(input("Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")) if(!input || !interactable()) return Centcomm_announce(input, usr) @@ -209,7 +209,7 @@ if(centcomm_message_cooldown) usr << "Arrays recycling. Please stand by." return - var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") + var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")) if(!input || !interactable()) return Syndicate_announce(input, usr) diff --git a/code/game/machinery/computer3/computers/security.dm b/code/game/machinery/computer3/computers/security.dm index 4c2f7369d2..e00aab556d 100644 --- a/code/game/machinery/computer3/computers/security.dm +++ b/code/game/machinery/computer3/computers/security.dm @@ -444,7 +444,7 @@ What a mess.*/ switch(href_list["field"]) if("name") if (istype(active1, /datum/data/record)) - var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) + var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon)))) || active1 != a1) return active1.fields["name"] = t1 diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 9f65c8235d..3a238e24b0 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -496,9 +496,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) usr.set_machine(src) if(href_list["set_channel_name"]) - src.channel_name = strip_html(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", "")) - while (findtext(src.channel_name," ") == 1) - src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1) + src.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", "")) src.updateUsrDialog() //src.update_icon() @@ -541,9 +539,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co src.updateUsrDialog() else if(href_list["set_new_message"]) - src.msg = strip_html(input(usr, "Write your Feed story", "Network Channel Handler", "")) - while (findtext(src.msg," ") == 1) - src.msg = copytext(src.msg,2,lentext(src.msg)+1) + src.msg = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", "")) src.updateUsrDialog() else if(href_list["set_attachment"]) @@ -600,15 +596,11 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co src.updateUsrDialog() else if(href_list["set_wanted_name"]) - src.channel_name = strip_html(input(usr, "Provide the name of the Wanted person", "Network Security Handler", "")) - while (findtext(src.channel_name," ") == 1) - src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1) + src.channel_name = sanitizeSafe(input(usr, "Provide the name of the Wanted person", "Network Security Handler", "")) src.updateUsrDialog() else if(href_list["set_wanted_desc"]) - src.msg = strip_html(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", "")) - while (findtext(src.msg," ") == 1) - src.msg = copytext(src.msg,2,lentext(src.msg)+1) + src.msg = sanitize(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", "")) src.updateUsrDialog() else if(href_list["submit_wanted"]) @@ -944,7 +936,7 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob) if(src.scribble_page == src.curr_page) user << "There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?" else - var/s = strip_html( input(user, "Write something", "Newspaper", "") ) + var/s = sanitize(input(user, "Write something", "Newspaper", "")) s = sanitize(s) if (!s) return diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index b2bdadfdbe..c8d1014c9b 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -284,7 +284,7 @@ src.log_message("Interfaced with [src_object].") return STATUS_INTERACTIVE if(src_object in view(2, src)) - return STATUS_UPDATE //if they're close enough, allow the occupant to see the screen through the viewport or whatever. + return STATUS_UPDATE //if they're close enough, allow the occupant to see the screen through the viewport or whatever. /obj/mecha/proc/melee_action(atom/target) return @@ -1569,8 +1569,8 @@ return if (href_list["change_name"]) if(usr != src.occupant) return - var/newname = strip_html_simple(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN) - if(newname && trim(newname)) + var/newname = sanitizeSafe(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN) + if(newname) name = newname else alert(occupant, "nope.avi") diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 051f2e8129..8fa25a3568 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -43,9 +43,9 @@ var/datum/topic_input/filter = new /datum/topic_input(href,href_list) if(href_list["send_message"]) var/obj/item/mecha_parts/mecha_tracking/MT = filter.getObj("send_message") - var/message = strip_html_simple(input(usr,"Input message","Transmit message") as text) + var/message = sanitize(input(usr,"Input message","Transmit message") as text) var/obj/mecha/M = MT.in_mecha() - if(trim(message) && M) + if(message && M) M.occupant_message(message) return if(href_list["shock"]) diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index f0d8a820c0..facafe41f2 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -114,7 +114,7 @@ move an amendment to the drawing.
usr << "\red Error! Please notify administration!" return var/list/turf/turfs = res - var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", "", MAX_NAME_LEN)) + var/str = sanitizeSafe(input("New area name:","Blueprint Editing", ""), MAX_NAME_LEN) if(!str || !length(str)) //cancel return if(length(str) > 50) @@ -154,7 +154,7 @@ move an amendment to the drawing. var/area/A = get_area() //world << "DEBUG: edit_area" var/prevname = "[A.name]" - var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", prevname, MAX_NAME_LEN)) + var/str = sanitizeSafe(input("New area name:","Blueprint Editing", prevname), MAX_NAME_LEN) if(!str || !length(str) || str==prevname) //cancel return if(length(str) > 50) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 0bc2139ae7..6dd7281b4f 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -689,7 +689,7 @@ var/global/list/obj/item/device/pda/PDAs = list() if ("Edit") var/n = input(U, "Please enter message", name, notehtml) as message if (in_range(src, U) && loc == U) - n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN) + n = sanitizeSafe(n, extra = 0) if (mode == 1) note = html_decode(n) notehtml = note @@ -972,7 +972,8 @@ var/global/list/obj/item/device/pda/PDAs = list() U.last_target_click = world.time var/t = input(U, "Please enter message", P.name, null) as text t = sanitize(t) - t = readd_quotes(t) + //t = readd_quotes(t) + t = replace_characters(t, list(""" = "\"")) if (!t || !istype(P)) return if (!in_range(src, U) && loc != U) diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index cfd50c37d5..8deb8d7a50 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -233,7 +233,7 @@ user << "\blue The MMI must go in after everything else!" if (istype(W, /obj/item/weapon/pen)) - var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name, MAX_NAME_LEN) + var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN) if (!t) return if (!in_range(src, usr) && src.loc != usr) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 3f11eb4bbe..43b852e249 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -53,7 +53,7 @@ var/heldname = "default name" /obj/item/borg/upgrade/rename/attack_self(mob/user as mob) - heldname = stripped_input(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN) + heldname = sanitizeSafe(input(user, "Enter new robot name", "Robot Reclassification", heldname), MAX_NAME_LEN) /obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R) if(..()) return 0 diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 9d47d2b08b..7c1e5b6a40 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -98,7 +98,7 @@ AI MODULES /obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob) ..() - var/targName = stripped_input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name) + var/targName = sanitize(input("Please enter the name of the person to safeguard.", "Safeguard who?", user.name)) targetName = targName desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not human and are a threat to humans.'", targetName, targetName) @@ -127,7 +127,7 @@ AI MODULES /obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob) ..() - var/targName = stripped_input(usr, "Please enter the name of the person who is the only human.", "Who?", user.real_name) + var/targName = sanitize(input("Please enter the name of the person who is the only human.", "Who?", user.real_name)) targetName = targName desc = text("A 'one human' AI module: 'Only [] is human.'", targetName) @@ -378,7 +378,7 @@ AI MODULES /obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob) ..() var/newlaw = "" - var/targName = stripped_input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw) + var/targName = sanitize(input("Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)) newFreeFormLaw = targName desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'" @@ -403,7 +403,7 @@ AI MODULES /obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob) ..() var/newlaw = "" - var/targName = stripped_input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw,MAX_MESSAGE_LEN) + var/targName = sanitize(input("Please enter a new law for the AI.", "Freeform Law Entry", newlaw)) newFreeFormLaw = targName desc = "A hacked AI law module: '[newFreeFormLaw]'" diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 9ad9b23f75..6a1ee735f4 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -224,7 +224,7 @@ /obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob) if(!src.registered_name) //Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak - var t = reject_bad_name(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)) + var t = sanitizeName(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)) if(!t) //Same as mob/new_player/prefrences.dm alert("Invalid name.") return diff --git a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm index ff33485f72..e45f51a088 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm @@ -52,7 +52,7 @@ user << "\red Circuit controls are locked." return var/existing_networks = list2text(network,",") - var/input = strip_html(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks)) + var/input = sanitize(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks)) if(!input) usr << "No input found please hang up and try your call again." return diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index c7c7e762ab..ea3b7d5752 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -152,7 +152,7 @@ Implant Specifics: