From 78eb9cbcd8fde5e2fcd691c63404659574c83173 Mon Sep 17 00:00:00 2001 From: Waterpig <49160555+Majkl-J@users.noreply.github.com> Date: Wed, 4 Dec 2024 19:27:13 +0100 Subject: [PATCH] [s] ensure key config is set for any secure request (#88367) (#2627) ## About The Pull Request If you set up a server without `COMMS_KEY` set it will be blank, which is a valid key ## Why It's Good For The Game CommKey validation should fail closed not open https://github.com/tgstation/tgstation/pull/88367 Co-authored-by: Letter N <24603524+LetterN@users.noreply.github.com> --- code/datums/world_topic.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/world_topic.dm b/code/datums/world_topic.dm index cb4879c82c8..3eab6cccc6f 100644 --- a/code/datums/world_topic.dm +++ b/code/datums/world_topic.dm @@ -26,7 +26,7 @@ var/require_comms_key = FALSE /datum/world_topic/proc/TryRun(list/input) - key_valid = config && (CONFIG_GET(string/comms_key) == input["key"]) + key_valid = (CONFIG_GET(string/comms_key) == input["key"]) && CONFIG_GET(string/comms_key) && input["key"] input -= "key" if(require_comms_key && !key_valid) . = "Bad Key"