aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-12-09 23:52:40 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-12-09 23:52:40 +0000
commitb72caf0be41c10876eabc60a1408bd9fe16dc82c (patch)
tree504ef4c30e0e7fa51fcc403a9abff843af6017e7
parentbf2a0e7eb2991158bee2175413148a068af4649f (diff)
downloadforums-b72caf0be41c10876eabc60a1408bd9fe16dc82c.tar
forums-b72caf0be41c10876eabc60a1408bd9fe16dc82c.tar.gz
forums-b72caf0be41c10876eabc60a1408bd9fe16dc82c.tar.bz2
forums-b72caf0be41c10876eabc60a1408bd9fe16dc82c.tar.xz
forums-b72caf0be41c10876eabc60a1408bd9fe16dc82c.zip
- tiny bit of sunshine :D
git-svn-id: file:///svn/phpbb/trunk@6734 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/memberlist.php4
-rw-r--r--phpBB/style.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 6b8455ef3b..f7efa43691 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -940,7 +940,7 @@ switch ($mode)
if ($ipdomain && $auth->acl_getf_global('m_info'))
{
- if (preg_match('#[a-z]#', $ipdomain))
+ if (strspn($ipdomain, 'abcdefghijklmnopqrstuvwxyz'))
{
$hostnames = gethostbynamel($ipdomain);
@@ -969,7 +969,7 @@ switch ($mode)
$sql = 'SELECT DISTINCT poster_id
FROM ' . POSTS_TABLE . '
- WHERE poster_ip ' . ((preg_match('#%#', $ips)) ? 'LIKE' : 'IN') . " ($ips)
+ WHERE poster_ip ' . ((strpos($ips, '%') !== false) ? 'LIKE' : 'IN') . " ($ips)
AND forum_id IN (0, " . implode(', ', $ip_forums) . ')';
$result = $db->sql_query($sql);
diff --git a/phpBB/style.php b/phpBB/style.php
index 496ae7c8e0..a9803aa4e5 100644
--- a/phpBB/style.php
+++ b/phpBB/style.php
@@ -33,7 +33,7 @@ if (!empty($load_extensions))
$sid = (isset($_GET['sid'])) ? htmlspecialchars($_GET['sid']) : '';
$id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
-if (!preg_match('/^[A-Za-z0-9]*$/', $sid))
+if (!ctype_alnum($sid))
{
$sid = '';
}