diff options
author | Nils Adermann <naderman@naderman.de> | 2006-12-16 20:24:34 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2006-12-16 20:24:34 +0000 |
commit | 1e34820cd87837b545b310022ee460803d8c5b54 (patch) | |
tree | 8cb1026f115e8fe067d770b2bbc5fa4a42de1ce1 /phpBB/includes/session.php | |
parent | 6938688e75e703208bd1087be8f37383da8e3f15 (diff) | |
download | forums-1e34820cd87837b545b310022ee460803d8c5b54.tar forums-1e34820cd87837b545b310022ee460803d8c5b54.tar.gz forums-1e34820cd87837b545b310022ee460803d8c5b54.tar.bz2 forums-1e34820cd87837b545b310022ee460803d8c5b54.tar.xz forums-1e34820cd87837b545b310022ee460803d8c5b54.zip |
- Optimize acl_getf_global a bit
- a little performance improvement of the IP regular expressions
- convert post_text/subject collation to utf8_unicode_ci if a user wants to use mysql_fulltext to allow case insensitivity [Bug #6272]
- mysql_fulltext should alter all necessary columns at once to speed up the process
- validate URLs against RFC3986
- fixed some weirdness in make_clickable
I hope I didn't break any URLs with this commit, if I did then report it to the bugtracker please!
git-svn-id: file:///svn/phpbb/trunk@6774 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r-- | phpBB/includes/session.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 229b7f10eb..e11245ec0c 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -158,8 +158,8 @@ class session // Whoa these look impressive! // The code to generate the following two regular expressions which match valid IPv4/IPv6 addresses // can be found in the develop directory - $ipv4 = '#^(?:(?:\d?\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d?\d|1\d\d|2[0-4]\d|25[0-5])$#'; - $ipv6 = '#^(?:(?:(?:[\dA-F]{1,4}:){6}(?:[\dA-F]{1,4}:[\dA-F]{1,4}|(?:(?:\d?\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(?:\d?\d|1\d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this->forwarded_for); @@ -313,7 +313,7 @@ class session // Added logging temporarly to help debug bugs... if (defined('DEBUG_EXTRA')) { - add_log('critical', 'LOG_IP_BROWSER_FORWARDED_CHECK', $u_ip, $s_ip, $u_browser, $s_browser, $u_forwarded, $s_forwarded); + add_log('critical', 'LOG_IP_BROWSER_FORWARDED_CHECK', $u_ip, $s_ip, $u_browser, $s_browser, $u_forwarded_for, $s_forwarded_for); } } } |