From e61f73a8db1ef69da09aaa7d99895df1fcea6019 Mon Sep 17 00:00:00 2001 From: FreezePhoenix <24441367+FreezePhoenix@users.noreply.github.com> Date: Fri, 1 Dec 2023 12:25:11 -0500 Subject: [PATCH] Fix Convert exploit This PR fixes an exploit involving boosters and converting old items into shells. --- node/server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node/server.js b/node/server.js index 6045951..44a8526 100644 --- a/node/server.js +++ b/node/server.js @@ -8011,7 +8011,7 @@ function init_io() { return; } server_log("booster " + data.num + " " + data.action); - if (!item || !in_arr(item.name, booster_items)) { + if (!item || !booster_items.includes(item.name)) { return fail_response("invalid"); } if (data.action == "activate" && !item.expires) { @@ -8019,7 +8019,7 @@ function init_io() { item.expires.setDate(item.expires.getDate() + 30 + (item.level || 0) * 2); //item.expires.setMinutes(item.expires.getMinutes()+2); } else if (data.action == "shift") { - if (!in_arr(data.to, booster_items)) { + if (!booster_items.includes(data.to)) { return fail_response("invalid"); } player.xpm = player.goldm = player.luckm = 1; @@ -8043,7 +8043,7 @@ function init_io() { var item = player.items[data.num]; var amount = 3600; server_log("stone " + data.num + " " + data.action); - if (!item || !in_arr(item.name, ["stoneofxp", "stoneofgold", "stoneofluck"])) { + if (!item || !["stoneofxp", "stoneofgold", "stoneofluck"].includes(item.name)) { return; } if (item.expires) {