From bfc7f0c2ce48572d5f690236152e2507d3bf7ca6 Mon Sep 17 00:00:00 2001 From: Bart van Bragt Date: Fri, 20 Dec 2002 14:04:59 +0000 Subject: [PATCH] Fixed bug #120, stripslashes in config table from 1.x and fixed parse error git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3217 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/upgrade.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phpBB/install/upgrade.php b/phpBB/install/upgrade.php index 128287aca0..d1b4ed1db3 100644 --- a/phpBB/install/upgrade.php +++ b/phpBB/install/upgrade.php @@ -39,7 +39,7 @@ if ( !defined('INSTALLING') ) if( defined("PHPBB_INSTALLED") ) { - redirect("../index.$phpEx); + redirect("../index.$phpEx"); } } @@ -565,9 +565,11 @@ if ( !empty($next) ) if ( !inarray($name, $ignore_configs) ) { $name = ( !empty($rename_configs[$name]) ) ? $rename_configs[$name] : $name; - + + // phpBB 1.x has some problems with escaping strings in the database. Try to correct for + // this by removing all slashes and then escaping once. $sql = "REPLACE INTO " . CONFIG_TABLE . " (config_name, config_value) - VALUES ('$name', '" . stripslashes($value) . "')"; + VALUES ('$name', '".addslashes(stripslashes(stripslashes($value)))."')"; query($sql, "Couldn't update config table with values from old config table"); } }