[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>
This commit is contained in:
Waterpig
2024-12-07 16:17:28 -07:00
committed by StrangeWeirdKitten
co-authored by Letter N
parent 9d542dd01a
commit 78eb9cbcd8
+1 -1
View File
@@ -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"