1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-23 11:35:24 +02:00

[ticket/9687] Fix incorrect check for ban end and invalid query

PHPBB3-9687
This commit is contained in:
Marc Alexander
2023-07-04 14:49:10 +02:00
parent 9b77dd0283
commit 7739eb2cfe

View File

@ -230,7 +230,7 @@ class manager
foreach ($ban_rows as $ban_row) foreach ($ban_rows as $ban_row)
{ {
if ($ban_row['end'] > 0 && $ban_row['end'] < time()) if (!$ban_row['end'] || $ban_row['end'] > time())
{ {
if (stripos($ban_row['item'], '*') === false) if (stripos($ban_row['item'], '*') === false)
{ {
@ -310,7 +310,7 @@ class manager
$where_array[] = ['AND', $where_array[] = ['AND',
[ [
['b.ban_item', '=', 'u.' . $user_column], ['b.ban_item', '=', 'u.' . $user_column],
['b.ban_mode', '=', $ban_mode->get_type()], ['b.ban_mode', '=', "'{$ban_mode->get_type()}'"],
], ],
]; ];
} }