From b4f264df048ca1720f94117a17b1e132ba0511cd Mon Sep 17 00:00:00 2001 From: EvilFactory Date: Mon, 25 Nov 2024 15:48:55 -0300 Subject: [PATCH] Fixed destination path not being checked --- Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsUtility.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsUtility.cs b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsUtility.cs index 14a7685ef..3354449e3 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsUtility.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/LuaCs/LuaCsUtility.cs @@ -149,6 +149,9 @@ namespace Barotrauma if (!IsPathAllowedException(path)) return; + if (!IsPathAllowedException(destination)) + return; + File.Move(path, destination, true); }