From cadef98ddd23d1211a2da361faab66debda80734 Mon Sep 17 00:00:00 2001 From: idinium96 <47635037+idinium96@users.noreply.github.com> Date: Wed, 4 Aug 2021 08:20:43 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20an=20exploit=20introduced?= =?UTF-8?q?=20on=20v4.4.0/v4.4.1=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/classes/MyHandler/MyHandler.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/classes/MyHandler/MyHandler.ts b/src/classes/MyHandler/MyHandler.ts index 55454e610..7d9e86b0a 100644 --- a/src/classes/MyHandler/MyHandler.ts +++ b/src/classes/MyHandler/MyHandler.ts @@ -1272,8 +1272,13 @@ export default class MyHandler extends Handler { if (match.enabled) { // User is taking too many - if (match.min !== 0) { + if ( + match.min !== 0 || + match.intent === 0 || + match.sell?.toValue(keyPrice.metal) === 0 // Just precaution - can't set this if intent was bank + ) { // If min is set to 0, how come it can be understocked right? + // fix exploit found on August 4th, 2021 const amountInInventory = inventoryManager.getInventory.getAmount(sku, false); if (amountInInventory > 0) {