mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
- fixing some very very nasty opera bugs by changing the clearing method we use.
- also properly apply preg_quote to some strings. git-svn-id: file:///svn/phpbb/trunk@7808 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -884,13 +884,13 @@ class session
|
||||
{
|
||||
if (!is_array($user_ips))
|
||||
{
|
||||
$ip_banned = preg_match('#^' . str_replace('*', '.*?', $row['ban_ip']) . '$#i', $user_ips);
|
||||
$ip_banned = preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_ip'], '#')) . '$#i', $user_ips);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($user_ips as $user_ip)
|
||||
{
|
||||
if (preg_match('#^' . str_replace('*', '.*?', $row['ban_ip']) . '$#i', $user_ip))
|
||||
if (preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_ip'], '#')) . '$#i', $user_ip))
|
||||
{
|
||||
$ip_banned = true;
|
||||
break;
|
||||
@@ -901,7 +901,7 @@ class session
|
||||
|
||||
if ((!empty($row['ban_userid']) && intval($row['ban_userid']) == $user_id) ||
|
||||
$ip_banned ||
|
||||
(!empty($row['ban_email']) && preg_match('#^' . str_replace('*', '.*?', $row['ban_email']) . '$#i', $user_email)))
|
||||
(!empty($row['ban_email']) && preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_email'], '#')) . '$#i', $user_email)))
|
||||
{
|
||||
if (!empty($row['ban_exclude']))
|
||||
{
|
||||
@@ -917,7 +917,7 @@ class session
|
||||
{
|
||||
$ban_triggered_by = 'user';
|
||||
}
|
||||
else if (!empty($row['ban_ip']) && preg_match('#^' . str_replace('*', '.*?', $row['ban_ip']) . '$#i', $user_ips))
|
||||
else if (!empty($row['ban_ip']) && preg_match('#^' . str_replace('\*', '.*?', preg_quote($row['ban_ip'], '#')) . '$#i', $user_ips))
|
||||
{
|
||||
$ban_triggered_by = 'ip';
|
||||
}
|
||||
|
Reference in New Issue
Block a user