Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...