Fix malicious/bad JS exploits

This commit is contained in:
skull132
2017-04-01 16:57:56 +03:00
parent f6e91b621a
commit 0f3d8c083e
4 changed files with 26 additions and 1 deletions
@@ -139,6 +139,10 @@
if (!conn_info || !conn_info.len)
return
else if (conn_info.len > 100)
log_debug("MIRROR BANS: [C.ckey] has [conn_info.len] unique sets. They were dropped and not processed.")
update_connection_data(C)
return
var/ding_bannu = 0
var/new_info = BAD_CKEY|BAD_IP|BAD_CID
+1
View File
@@ -36,6 +36,7 @@
//SECURITY//
////////////
var/next_allowed_topic_time = 10
var/info_sent = 0
// comment out the line below when debugging locally to enable the options & messages menu
//control_freak = 1
+6 -1
View File
@@ -25,7 +25,12 @@
return
if (href_list["EMERG"] && href_list["EMERG"] == "action")
handle_connection_info(src, href_list["data"])
if (!info_sent)
handle_connection_info(src, href_list["data"])
info_sent = 1
else
server_greeting.close_window(src, "Your greeting window has malfunctioned and has been shut down.")
return
//Reduces spamming of links by dropping calls that happen during the delay period