From 08a2b1d8d094101418134d467ee91b096c64f7ef Mon Sep 17 00:00:00 2001 From: Letter N <24603524+LetterN@users.noreply.github.com> Date: Thu, 5 Dec 2024 01:25:39 +0800 Subject: [PATCH] [s] ensure key config is set for any secure request (#88367) ## 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 ## Changelog --- 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 a9971f6068c..2a4af3a781a 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"