From 12d9f2caabf1ce2aa27c1dcff81dca1e35d40e4b Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 4 May 2020 02:21:47 -0400 Subject: [PATCH] Don't repeatedly trust the same .dmb --- .../Components/Byond/ByondExecutableLock.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Tgstation.Server.Host/Components/Byond/ByondExecutableLock.cs b/src/Tgstation.Server.Host/Components/Byond/ByondExecutableLock.cs index 3db6cf05d7..21e95c4452 100644 --- a/src/Tgstation.Server.Host/Components/Byond/ByondExecutableLock.cs +++ b/src/Tgstation.Server.Host/Components/Byond/ByondExecutableLock.cs @@ -89,6 +89,9 @@ namespace Tgstation.Server.Host.Components.Byond trustedFileText = String.Empty; } + if (trustedFileText.Contains(fullDmbPath, StringComparison.Ordinal)) + return; + trustedFileText = $"{trustedFileText}{fullDmbPath}{Environment.NewLine}"; var newTrustedFileBytes = Encoding.UTF8.GetBytes(trustedFileText);