From bb4ff196b337f1cb1af657fd3302ff3d4bc41ea7 Mon Sep 17 00:00:00 2001 From: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Date: Wed, 12 Jul 2023 10:33:02 -0700 Subject: [PATCH] Citation payments check for valid amount (#76760) ## About The Pull Request Fixes https://github.com/tgstation/tgstation/issues/76705 ## Why It's Good For The Game Citations shouldn't be exploitable for free money. ## Changelog :cl: LT3 fix: Security records no longer accept negative values for citation payment /:cl: --- code/datums/records/crime.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/datums/records/crime.dm b/code/datums/records/crime.dm index e16995b5514..77e3d5b1001 100644 --- a/code/datums/records/crime.dm +++ b/code/datums/records/crime.dm @@ -32,6 +32,9 @@ /// Pays off a fine and attempts to fix any weird values. /datum/crime/citation/proc/pay_fine(amount) + if(amount <= 0) + return FALSE + paid += amount if(paid > fine) paid = fine