fixes an exploit (#10029)

This commit is contained in:
Seris02
2021-12-12 06:20:05 +00:00
committed by GitHub
parent bc5634d6ba
commit 81955f8e65
@@ -27,12 +27,21 @@
preferences.character_preview_view?.update_body()
return TRUE
// SKYRAT EDIT
/datum/preference_middleware/jobs/proc/set_job_title(list/params, mob/user)
var/default_job_title = params["job"]
var/job_title = params["job"]
var/new_job_title = params["new_title"]
preferences.alt_job_titles[default_job_title] = new_job_title
var/datum/job/job = SSjob.GetJob(job_title)
if (isnull(job))
return FALSE
if (!(new_job_title in job.alt_titles))
return FALSE
preferences.alt_job_titles[job_title] = new_job_title
return TRUE
// SKYRAT EDIT END