diff -ruN 2.2ms2-051113/admin/includes/configure.php 2.2ms2-060817/admin/includes/configure.php --- 2.2ms2-051113/admin/includes/configure.php 2006-06-06 15:10:45.000000000 -0500 +++ 2.2ms2-060817/admin/includes/configure.php 2006-08-18 15:52:55.000000000 -0500 @@ -37,9 +37,6 @@ define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); -// protected since inside docroot instead of outside to facilitate addon installer - define('DIR_FS_WORK', '[% installdir %]/admin/_work/'); - // define our database connection define('DB_SERVER', '[% mysql.osc.sqlhost %]'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', '[% mysql_user %]'); diff -ruN 2.2ms2-051113/admin/includes/functions/compatibility.php 2.2ms2-060817/admin/includes/functions/compatibility.php --- 2.2ms2-051113/admin/includes/functions/compatibility.php 2003-06-23 01:20:06.000000000 -0500 +++ 2.2ms2-060817/admin/includes/functions/compatibility.php 2006-08-16 16:48:23.000000000 -0500 @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2003 osCommerce + Copyright (c) 2006 osCommerce Released under the GNU General Public License */ @@ -19,8 +19,8 @@ if (!is_array($ar)) return false; while (list($key, $value) = each($ar)) { - if (is_array($value)) { - do_magic_quotes_gpc($value); + if (is_array($ar[$key])) { + do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } diff -ruN 2.2ms2-051113/admin/includes/functions/general.php 2.2ms2-060817/admin/includes/functions/general.php --- 2.2ms2-051113/admin/includes/functions/general.php 2005-09-30 00:12:16.000000000 -0500 +++ 2.2ms2-060817/admin/includes/functions/general.php 2006-08-17 16:47:00.000000000 -0500 @@ -897,8 +897,8 @@ tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "'"); tep_db_query("delete from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "'"); tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$product_id . "'"); - tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where products_id = '" . (int)$product_id . "'"); - tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . (int)$product_id . "'"); + tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where products_id = '" . (int)$product_id . "' or products_id like '" . (int)$product_id . "{%'"); + tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . (int)$product_id . "' or products_id like '" . (int)$product_id . "{%'"); $product_reviews_query = tep_db_query("select reviews_id from " . TABLE_REVIEWS . " where products_id = '" . (int)$product_id . "'"); while ($product_reviews = tep_db_fetch_array($product_reviews_query)) { diff -ruN 2.2ms2-051113/admin/includes/languages/english/index.php 2.2ms2-060817/admin/includes/languages/english/index.php --- 2.2ms2-051113/admin/includes/languages/english/index.php 2002-03-30 10:10:40.000000000 -0600 +++ 2.2ms2-060817/admin/includes/languages/english/index.php 2006-08-16 18:06:35.000000000 -0500 @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2002 osCommerce + Copyright (c) 2006 osCommerce Released under the GNU General Public License */ @@ -17,12 +17,7 @@ define('BOX_ENTRY_SUPPORT_SITE', 'Support Site'); define('BOX_ENTRY_SUPPORT_FORUMS', 'Support Forums'); -define('BOX_ENTRY_MAILING_LISTS', 'Mailing Lists'); -define('BOX_ENTRY_BUG_REPORTS', 'Bug Reports'); -define('BOX_ENTRY_FAQ', 'FAQ'); -define('BOX_ENTRY_LIVE_DISCUSSIONS', 'Live Discussions'); -define('BOX_ENTRY_CVS_REPOSITORY', 'CVS Repository'); -define('BOX_ENTRY_INFORMATION_PORTAL', 'Information Portal'); +define('BOX_ENTRY_CONTRIBUTIONS', 'Contributions'); define('BOX_ENTRY_CUSTOMERS', 'Customers:'); define('BOX_ENTRY_PRODUCTS', 'Products:'); diff -ruN 2.2ms2-051113/admin/includes/languages/espanol/index.php 2.2ms2-060817/admin/includes/languages/espanol/index.php --- 2.2ms2-051113/admin/includes/languages/espanol/index.php 2003-07-06 20:33:02.000000000 -0500 +++ 2.2ms2-060817/admin/includes/languages/espanol/index.php 2006-08-16 18:06:35.000000000 -0500 @@ -17,12 +17,7 @@ define('BOX_ENTRY_SUPPORT_SITE', 'Soporte'); define('BOX_ENTRY_SUPPORT_FORUMS', 'Foros'); -define('BOX_ENTRY_MAILING_LISTS', 'Listas de Correo'); -define('BOX_ENTRY_BUG_REPORTS', 'Notificar Fallos'); -define('BOX_ENTRY_FAQ', 'PUF (FAQ)'); -define('BOX_ENTRY_LIVE_DISCUSSIONS', 'Discusiones'); -define('BOX_ENTRY_CVS_REPOSITORY', 'Repositorio CVS'); -define('BOX_ENTRY_INFORMATION_PORTAL', 'Portal'); +define('BOX_ENTRY_CONTRIBUTIONS', 'Módulos'); define('BOX_ENTRY_CUSTOMERS', 'Clientes:'); define('BOX_ENTRY_PRODUCTS', 'Productos:'); diff -ruN 2.2ms2-051113/admin/includes/languages/german/index.php 2.2ms2-060817/admin/includes/languages/german/index.php --- 2.2ms2-051113/admin/includes/languages/german/index.php 2002-03-30 13:32:08.000000000 -0600 +++ 2.2ms2-060817/admin/includes/languages/german/index.php 2006-08-16 18:06:35.000000000 -0500 @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2002 osCommerce + Copyright (c) 2006 osCommerce Released under the GNU General Public License */ @@ -17,12 +17,7 @@ define('BOX_ENTRY_SUPPORT_SITE', 'Support Seite'); define('BOX_ENTRY_SUPPORT_FORUMS', 'Support Forum'); -define('BOX_ENTRY_MAILING_LISTS', 'Mailing Listen'); -define('BOX_ENTRY_BUG_REPORTS', 'Fehler Reporte'); -define('BOX_ENTRY_FAQ', 'Fragen und Antworten'); -define('BOX_ENTRY_LIVE_DISCUSSIONS', 'Live Diskussionen'); -define('BOX_ENTRY_CVS_REPOSITORY', 'CVS Repository'); -define('BOX_ENTRY_INFORMATION_PORTAL', 'Informations Portal'); +define('BOX_ENTRY_CONTRIBUTIONS', 'Add-On Module'); define('BOX_ENTRY_CUSTOMERS', 'Kunden:'); define('BOX_ENTRY_PRODUCTS', 'Produkte:'); diff -ruN 2.2ms2-051113/admin/index.php 2.2ms2-060817/admin/index.php --- 2.2ms2-051113/admin/index.php 2003-06-27 09:38:32.000000000 -0500 +++ 2.2ms2-060817/admin/index.php 2006-08-16 18:06:35.000000000 -0500 @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2003 osCommerce + Copyright (c) 2006 osCommerce Released under the GNU General Public License */ @@ -115,13 +115,8 @@ $contents[] = array('params' => 'class="infoBox"', 'text' => '' . BOX_ENTRY_SUPPORT_SITE . '
' . - '' . BOX_ENTRY_SUPPORT_FORUMS . '
' . - '' . BOX_ENTRY_MAILING_LISTS . '
' . - '' . BOX_ENTRY_BUG_REPORTS . '
' . - '' . BOX_ENTRY_FAQ . '
' . - '' . BOX_ENTRY_LIVE_DISCUSSIONS . '
' . - '' . BOX_ENTRY_CVS_REPOSITORY . '
' . - '' . BOX_ENTRY_INFORMATION_PORTAL . ''); + '' . BOX_ENTRY_SUPPORT_FORUMS . '
' . + '' . BOX_ENTRY_CONTRIBUTIONS . ''); $box = new box; echo $box->menuBox($heading, $contents); diff -ruN 2.2ms2-051113/includes/classes/sessions.php 2.2ms2-060817/includes/classes/sessions.php --- 2.2ms2-051113/includes/classes/sessions.php 2003-06-16 16:24:00.000000000 -0500 +++ 2.2ms2-060817/includes/classes/sessions.php 2006-08-16 17:13:45.000000000 -0500 @@ -377,6 +377,12 @@ } } + if (!empty($session->id)) { + if (preg_match('/^[a-zA-Z0-9]+$/', $session->id) == false) { + unset($session->id); + } + } + /* // Check the REQUEST_URI symbol for a string of the form // '=' to allow URLs of the form diff -ruN 2.2ms2-051113/includes/classes/shopping_cart.php 2.2ms2-060817/includes/classes/shopping_cart.php --- 2.2ms2-051113/includes/classes/shopping_cart.php 2005-09-30 00:08:54.000000000 -0500 +++ 2.2ms2-060817/includes/classes/shopping_cart.php 2006-08-16 12:17:08.000000000 -0500 @@ -81,7 +81,19 @@ $products_id_string = tep_get_uprid($products_id, $attributes); $products_id = tep_get_prid($products_id_string); - if (is_numeric($products_id) && is_numeric($qty)) { + $attributes_pass_check = true; + + if (is_array($attributes)) { + reset($attributes); + while (list($option, $value) = each($attributes)) { + if (!is_numeric($option) || !is_numeric($value)) { + $attributes_pass_check = false; + break; + } + } + } + + if (is_numeric($products_id) && is_numeric($qty) && ($attributes_pass_check == true)) { $check_product_query = tep_db_query("select products_status from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $check_product = tep_db_fetch_array($check_product_query); @@ -122,7 +134,19 @@ $products_id_string = tep_get_uprid($products_id, $attributes); $products_id = tep_get_prid($products_id_string); - if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity)) { + $attributes_pass_check = true; + + if (is_array($attributes)) { + reset($attributes); + while (list($option, $value) = each($attributes)) { + if (!is_numeric($option) || !is_numeric($value)) { + $attributes_pass_check = false; + break; + } + } + } + + if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity) && ($attributes_pass_check == true)) { $this->contents[$products_id_string] = array('qty' => $quantity); // update database if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . (int)$quantity . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "'"); diff -ruN 2.2ms2-051113/includes/configure.php 2.2ms2-060817/includes/configure.php --- 2.2ms2-051113/includes/configure.php 2006-06-06 14:59:49.000000000 -0500 +++ 2.2ms2-060817/includes/configure.php 2006-08-18 15:51:41.000000000 -0500 @@ -22,7 +22,6 @@ define('HTTPS_COOKIE_PATH', '/[% installpath %]/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); - define('DIR_WS_ADMIN', '/admin/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); @@ -34,14 +33,10 @@ define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/'); - define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); -// protected since inside docroot instead of outside to facilitate addon installer - define('DIR_FS_WORK', '[% installdir %]/admin/_work/'); - // define our database connection define('DB_SERVER', '[% mysql.osc.sqlhost %]'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', '[% mysql_user %]'); diff -ruN 2.2ms2-051113/includes/functions/cache.php 2.2ms2-060817/includes/functions/cache.php --- 2.2ms2-051113/includes/functions/cache.php 2003-07-01 14:34:54.000000000 -0500 +++ 2.2ms2-060817/includes/functions/cache.php 2006-08-16 17:02:55.000000000 -0500 @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2003 osCommerce + Copyright (c) 2006 osCommerce Released under the GNU General Public License */ @@ -100,6 +100,8 @@ function tep_cache_categories_box($auto_expire = false, $refresh = false) { global $cPath, $language, $languages_id, $tree, $cPath_array, $categories_string; + $cache_output = ''; + if (($refresh == true) || !read_cache($cache_output, 'categories_box-' . $language . '.cache' . $cPath, $auto_expire)) { ob_start(); include(DIR_WS_BOXES . 'categories.php'); @@ -117,8 +119,10 @@ function tep_cache_manufacturers_box($auto_expire = false, $refresh = false) { global $HTTP_GET_VARS, $language; + $cache_output = ''; + $manufacturers_id = ''; - if (isset($HTTP_GET_VARS['manufactuers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) { + if (isset($HTTP_GET_VARS['manufactuers_id']) && is_numeric($HTTP_GET_VARS['manufacturers_id'])) { $manufacturers_id = $HTTP_GET_VARS['manufacturers_id']; } @@ -139,12 +143,16 @@ function tep_cache_also_purchased($auto_expire = false, $refresh = false) { global $HTTP_GET_VARS, $language, $languages_id; - if (($refresh == true) || !read_cache($cache_output, 'also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id'], $auto_expire)) { - ob_start(); - include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); - $cache_output = ob_get_contents(); - ob_end_clean(); - write_cache($cache_output, 'also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id']); + $cache_output = ''; + + if (isset($HTTP_GET_VARS['products_id']) && is_numeric($HTTP_GET_VARS['products_id'])) { + if (($refresh == true) || !read_cache($cache_output, 'also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id'], $auto_expire)) { + ob_start(); + include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); + $cache_output = ob_get_contents(); + ob_end_clean(); + write_cache($cache_output, 'also_purchased-' . $language . '.cache' . $HTTP_GET_VARS['products_id']); + } } return $cache_output; diff -ruN 2.2ms2-051113/includes/functions/compatibility.php 2.2ms2-060817/includes/functions/compatibility.php --- 2.2ms2-051113/includes/functions/compatibility.php 2003-04-09 16:12:54.000000000 -0500 +++ 2.2ms2-060817/includes/functions/compatibility.php 2006-08-16 16:48:23.000000000 -0500 @@ -5,7 +5,7 @@ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com - Copyright (c) 2003 osCommerce + Copyright (c) 2006 osCommerce Released under the GNU General Public License @@ -22,8 +22,8 @@ if (!is_array($ar)) return false; while (list($key, $value) = each($ar)) { - if (is_array($value)) { - do_magic_quotes_gpc($value); + if (is_array($ar[$key])) { + do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } diff -ruN 2.2ms2-051113/includes/functions/general.php 2.2ms2-060817/includes/functions/general.php --- 2.2ms2-051113/includes/functions/general.php 2005-09-30 00:11:08.000000000 -0500 +++ 2.2ms2-060817/includes/functions/general.php 2006-08-17 08:56:41.000000000 -0500 @@ -450,7 +450,7 @@ $state = tep_get_zone_code($address['country_id'], $address['zone_id'], $state); } } elseif (isset($address['country']) && tep_not_null($address['country'])) { - $country = tep_output_string_protected($address['country']); + $country = tep_output_string_protected($address['country']['title']); } else { $country = ''; } @@ -480,7 +480,6 @@ $statecomma = ''; $streets = $street; if ($suburb != '') $streets = $street . $cr . $suburb; - if ($country == '') $country = tep_output_string_protected($address['country']); if ($state != '') $statecomma = $state . ', '; $fmt = $address_format['format']; diff -ruN 2.2ms2-051113/includes/functions/html_output.php 2.2ms2-060817/includes/functions/html_output.php --- 2.2ms2-051113/includes/functions/html_output.php 2005-09-30 00:15:02.000000000 -0500 +++ 2.2ms2-060817/includes/functions/html_output.php 2006-08-16 17:02:19.000000000 -0500 @@ -88,10 +88,10 @@ if ($image_size = @getimagesize($src)) { if (empty($width) && tep_not_null($height)) { $ratio = $height / $image_size[1]; - $width = $image_size[0] * $ratio; + $width = intval($image_size[0] * $ratio); } elseif (tep_not_null($width) && empty($height)) { $ratio = $width / $image_size[0]; - $height = $image_size[1] * $ratio; + $height = intval($image_size[1] * $ratio); } elseif (empty($width) && empty($height)) { $width = $image_size[0]; $height = $image_size[1]; diff -ruN 2.2ms2-051113/includes/languages/english/modules/shipping/ups.php 2.2ms2-060817/includes/languages/english/modules/shipping/ups.php --- 2.2ms2-051113/includes/languages/english/modules/shipping/ups.php 2002-11-19 00:48:08.000000000 -0600 +++ 2.2ms2-060817/includes/languages/english/modules/shipping/ups.php 1969-12-31 18:00:00.000000000 -0600 @@ -1,25 +0,0 @@ - diff -ruN 2.2ms2-051113/includes/languages/espanol/modules/shipping/ups.php 2.2ms2-060817/includes/languages/espanol/modules/shipping/ups.php --- 2.2ms2-051113/includes/languages/espanol/modules/shipping/ups.php 2002-11-19 00:14:34.000000000 -0600 +++ 2.2ms2-060817/includes/languages/espanol/modules/shipping/ups.php 1969-12-31 18:00:00.000000000 -0600 @@ -1,25 +0,0 @@ - diff -ruN 2.2ms2-051113/includes/languages/german/modules/shipping/ups.php 2.2ms2-060817/includes/languages/german/modules/shipping/ups.php --- 2.2ms2-051113/includes/languages/german/modules/shipping/ups.php 2003-07-11 09:04:24.000000000 -0500 +++ 2.2ms2-060817/includes/languages/german/modules/shipping/ups.php 1969-12-31 18:00:00.000000000 -0600 @@ -1,25 +0,0 @@ - diff -ruN 2.2ms2-051113/shopping_cart.php 2.2ms2-060817/shopping_cart.php --- 2.2ms2-051113/shopping_cart.php 2003-06-09 23:03:56.000000000 -0500 +++ 2.2ms2-060817/shopping_cart.php 2006-08-16 12:17:08.000000000 -0500 @@ -81,13 +81,13 @@ echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value); $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa - where pa.products_id = '" . $products[$i]['id'] . "' - and pa.options_id = '" . $option . "' + where pa.products_id = '" . (int)$products[$i]['id'] . "' + and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id - and pa.options_values_id = '" . $value . "' + and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id - and popt.language_id = '" . $languages_id . "' - and poval.language_id = '" . $languages_id . "'"); + and popt.language_id = '" . (int)$languages_id . "' + and poval.language_id = '" . (int)$languages_id . "'"); $attributes_values = tep_db_fetch_array($attributes); $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name']; diff -ruN 2.2ms2-051113/tell_a_friend.php 2.2ms2-060817/tell_a_friend.php --- 2.2ms2-051113/tell_a_friend.php 2003-06-11 17:35:02.000000000 -0500 +++ 2.2ms2-060817/tell_a_friend.php 2006-08-17 09:19:02.000000000 -0500 @@ -1,11 +1,11 @@