This is an automated email from the git hooks/post-receive script.

skunnyk pushed a 
commit to branch 
oldforum
in repository www/forum.xfce.org.

commit fd0678331602f58404265277b273fa3c410b518e
Author: Nick Schermer <n...@xfce.org>
Date:   Tue Sep 20 17:40:59 2011 +0200

    Update to fluxbb 1.4.7.
---
 db_update.php         | 14 +++++++-------
 include/common.php    |  2 +-
 include/functions.php |  7 +++++--
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/db_update.php b/db_update.php
index ce6273d..20a00af 100644
--- a/db_update.php
+++ b/db_update.php
@@ -7,7 +7,7 @@
  */
 
 // The FluxBB version this script updates to
-define('UPDATE_TO', '1.4.6');
+define('UPDATE_TO', '1.4.7');
 
 define('UPDATE_TO_DB_REVISION', 15);
 define('UPDATE_TO_SI_REVISION', 2);
@@ -129,6 +129,7 @@ $default_lang = $pun_config['o_default_lang'];
 if (!file_exists(PUN_ROOT.'lang/'.$default_lang.'/update.php'))
        $default_lang = 'English';
 
+require PUN_ROOT.'lang/'.$default_lang.'/common.php';
 require PUN_ROOT.'lang/'.$default_lang.'/update.php';
 
 // Check current version
@@ -467,7 +468,7 @@ if (empty($stage))
                $message = str_replace($pattern, $replace, 
$pun_config['o_maintenance_message']);
 
 ?>
-<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en" dir="ltr">
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="<?php echo 
$lang_common['lang_identifier'] ?>" lang="<?php echo 
$lang_common['lang_identifier'] ?>" dir="<?php echo 
$lang_common['lang_direction'] ?>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title><?php echo $lang_update['Maintenance'] ?></title>
@@ -505,7 +506,7 @@ if (empty($stage))
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
 
-<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en" dir="ltr">
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="<?php echo 
$lang_common['lang_identifier'] ?>" lang="<?php echo 
$lang_common['lang_identifier'] ?>" dir="<?php echo 
$lang_common['lang_direction'] ?>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title><?php echo $lang_update['Update'] ?></title>
@@ -1627,7 +1628,7 @@ switch ($stage)
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
 
-<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en" dir="ltr">
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="<?php echo 
$lang_common['lang_identifier'] ?>" lang="<?php echo 
$lang_common['lang_identifier'] ?>" dir="<?php echo 
$lang_common['lang_direction'] ?>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title><?php echo $lang_update['Update'] ?></title>
@@ -1864,7 +1865,7 @@ foreach ($errors[$id] as $cur_error)
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
 
-<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en" dir="ltr">
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="<?php echo 
$lang_common['lang_identifier'] ?>" lang="<?php echo 
$lang_common['lang_identifier'] ?>" dir="<?php echo 
$lang_common['lang_direction'] ?>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title><?php echo $lang_update['Update'] ?></title>
@@ -1904,5 +1905,4 @@ $db->end_transaction();
 $db->close();
 
 if ($query_str != '')
-       exit('<script 
type="text/javascript">window.location="db_update.php'.$query_str.'&uid='.$uid.'"</script><noscript><meta
 http-equiv="refresh" content="0;url=db_update.php'.$query_str.'&uid='.$uid.'" 
/></noscript>');
-
+       exit('<script 
type="text/javascript">window.location="db_update.php'.$query_str.'&uid='.$uid.'"</script><noscript><meta
 http-equiv="refresh" content="0;url=db_update.php'.$query_str.'&uid='.$uid.'" 
/></noscript>');
\ No newline at end of file
diff --git a/include/common.php b/include/common.php
index a9d6015..59d21e6 100644
--- a/include/common.php
+++ b/include/common.php
@@ -10,7 +10,7 @@ if (!defined('PUN_ROOT'))
        exit('The constant PUN_ROOT must be defined and point to a valid FluxBB 
installation root directory.');
 
 // Define the version and database revision that this code was written for
-define('FORUM_VERSION', '1.4.6');
+define('FORUM_VERSION', '1.4.7');
 
 define('FORUM_DB_REVISION', 15);
 define('FORUM_SI_REVISION', 2);
diff --git a/include/functions.php b/include/functions.php
index 7e9cfaa..7f10be3 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1114,8 +1114,11 @@ function get_remote_address()
                        // X-Forwarded-For: client1, proxy1, proxy2
                        // where the value is a comma+space separated list of 
IP addresses, the left-most being the farthest downstream client,
                        // and each successive proxy that passed the request 
adding the IP address where it received the request from.
-                       $remote_addr = explode(',', 
$_SERVER['HTTP_X_FORWARDED_FOR']);
-                       $remote_addr = trim($remote_addr[0]);
+                       $forwarded_for = explode(',', 
$_SERVER['HTTP_X_FORWARDED_FOR']);
+                       $forwarded_for = trim($forwarded_for[0]);
+
+                       if 
(@preg_match('%^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$%', 
$forwarded_for) || 
@preg_match('%^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\
 [...]
+                               $remote_addr = $forwarded_for;
                }
        }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to