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.
This commit is contained in:
Jordie
2020-06-11 07:12:37 +10:00
committed by GitHub
parent 4b85bc1496
commit 67e4646d34
+4 -4
View File
@@ -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,
))