diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 4eea2097ed..ca436a38ea 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -50,7 +50,11 @@ if(computer_id) failedcid = 0 - cidquery = " OR computerid = '[sanitizeSQL(computer_id)]' " + if(isnum(text2num(computer_id))) + cidquery = " OR computerid = '[computer_id]' " + else + log_misc("Key [ckeytext] cid not checked. Non-Numeric: [computer_id]") + failedcid = 1 var/DBQuery/query = SSdbcore.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_ban WHERE (ckey = :t_ckey [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)", list("t_ckey" = ckeytext)) //CHOMPEdit TGSQL diff --git a/code/modules/vchat/vchat_client.dm b/code/modules/vchat/vchat_client.dm index 76543c7cf8..7768830a2e 100644 --- a/code/modules/vchat/vchat_client.dm +++ b/code/modules/vchat/vchat_client.dm @@ -266,7 +266,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic if(cid && !isnum(cid) && !(cid == "")) log_and_message_admins("[key_name(owner)] - bancheck with invalid cid! ([cid])") - if(ip && !findtext(ip, new/regex("^((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)\\.?\\b){4}$")) && !(ip == "")) + if(ip && !findtext(ip, new/regex(@"^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$")) && !(ip == "")) log_and_message_admins("[key_name(owner)] - bancheck with invalid ip! ([ip])") var/list/ban = world.IsBanned(key = ckey, address = ip, computer_id = cid)