From 67e4646d34f96b41d3032a3411042bc263dcbf3b Mon Sep 17 00:00:00 2001 From: Jordie <4343468+Jordie0608@users.noreply.github.com> Date: Thu, 11 Jun 2020 07:12:37 +1000 Subject: [PATCH] Fix for unbanning panel search (#51564) I tested with general logging on, these parameters were being passed as '' instead from DM's "" to NULL in sql. i.e. WHERE ('dave' IS NULL OR ckey = 'dave') AND (NULL IS NULL OR a_ckey = NULL) AND ('' IS NULL OR ip = INET_ATON('')) AND ('' IS NULL OR computerid = '') Haven't checked if this is happening elsewhere. --- code/modules/admin/sql_ban_system.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/admin/sql_ban_system.dm b/code/modules/admin/sql_ban_system.dm index fe0cc27798b..eeb5bebdcf0 100644 --- a/code/modules/admin/sql_ban_system.dm +++ b/code/modules/admin/sql_ban_system.dm @@ -593,8 +593,8 @@ "}, list( "player_key" = ckey(player_key), "admin_key" = ckey(admin_key), - "player_ip" = player_ip, - "player_cid" = player_cid, + "player_ip" = player_ip || null, + "player_cid" = player_cid || null, )) if(!query_unban_count_bans.warn_execute()) qdel(query_unban_count_bans) @@ -653,8 +653,8 @@ "}, list( "player_key" = ckey(player_key), "admin_key" = ckey(admin_key), - "player_ip" = player_ip, - "player_cid" = player_cid, + "player_ip" = player_ip || null, + "player_cid" = player_cid || null, "skip" = bansperpage * page, "take" = bansperpage, ))