From 39c0007c84bce717891f9586d6f5455651695cc1 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sat, 21 Jan 2012 00:48:24 -0700 Subject: [PATCH] Exploit prevention. Previously, the server trusted the client's tileType, now we check it ourselves. --- TShockAPI/TShock.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index fca151f3..acba931b 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1094,7 +1094,7 @@ namespace TShockAPI { foreach (Point p in player.IceTiles) { - if (p.X == tileX && p.Y == tileY && (tileType == 0 || tileType == 127)) + if (p.X == tileX && p.Y == tileY && (Main.tile[p.X, p.Y].type == 0 || Main.tile[p.X, p.Y].type == 127)) { player.IceTiles.Remove(p); return false; @@ -1106,7 +1106,6 @@ namespace TShockAPI if (TShock.Config.AllowIce && actionType == 1 && tileType == 127) { - player.IceTiles.Add(new Point(tileX, tileY)); return false; }