Juto Posted September 2, 2011 Posted September 2, 2011 There are som addons that use this (in admin/categories) $products_image_name = ($dir ? $dir . '\/' : '') . $products_image->filename; Later on stripslashes($products_image_name) thus removing the backslash. The stripslashes() function removes backslashes which may have been added by the addslashes() function. Thus: stripslashes($products_image_name) is the same as not having the backslash to begin with. There's only one place where stripslashes isn't used, namely at $action == 'new_product_preview' line ~829 That code block have an additional condition: if (tep_not_null($_POST)) { } and within that condition $products_image_name = $pInfo->products_image; Is not used. It seems to me that having a backslash in $products_image_name is not needed at all. Test and pay attention to line 1016 (core code) where stripslashes($products_image_name) originaly is in use On my dev site I have removed the backslash and removed the use of stripslashes (all instances), plus added the missing line $products_image = $_POST['products_image']; for the action 'new_product_preview' line ~829 The test shows that the backslash IS a bug, plus that the stripslashes of $products_image_name is NOT needed. See it at http://www.u2commerce.com Click on category "Test". Sara Quote Contributions: http://addons.oscommerce.com/info/8010 http://addons.oscommerce.com/info/8204 http://addons.oscommerce.com/info/8681
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.