From c08765d0ebcd1a7728c9edd68404d026da8dc3ad Mon Sep 17 00:00:00 2001 From: Letter N <24603524+LetterN@users.noreply.github.com> Date: Wed, 20 Jan 2021 10:23:30 +0800 Subject: [PATCH] let's not get ddosed --- code/game/world.dm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/game/world.dm b/code/game/world.dm index 97ed64a405..4369ca6668 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -197,6 +197,14 @@ GLOBAL_LIST(topic_status_cache) /world/Topic(T, addr, master, key) TGS_TOPIC //redirect to server tools if necessary + if(!SSfail2topic) + return "Server not initialized." + if(SSfail2topic.IsRateLimited(addr)) + return "Rate limited." + + if(length(T) > CONFIG_GET(number/topic_max_size)) + return "Payload too large!" + var/static/list/topic_handlers = TopicHandlers() var/list/input = params2list(T)