close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Security Issues

Thread began 5/24/2010 3:56 am by tyler815351411 | Last modified 9/06/2011 3:34 pm by tyler815351411 | 1653 views | 9 replies

Eric Mittman

I have been informed by a colleague who has looked into this that the specific problem that was causing the MySQL type of errors to occur can be addressed with a code update to the page.

On the products results page update the code that is on lines 75-91

from this:

php:
<?php

if ( isset($_GET["Search"]))  {
  
$_SESSION["WADbSearch1_Products_Cat"]="";
  if (isset(
$_GET["ProductCategoryID"]))  {
    if (
$WADbSearch1->whereClause != "")  {
      
$WADbSearch1->whereClause .= " AND ";
    } else  {
      
$WADbSearch1->whereClause .= " WHERE ";
    }
    
$WADbSearch1->whereClause .= "ProductID IN (SELECT ProductID FROM ps3_productcategories WHERE (CategoryID = ".implode($_GET["ProductCategoryID"]," OR CategoryID = ")."))";
    
$_SESSION["WADbSearch1_Products_Results"]=$WADbSearch1->whereClause;
    if (
sizeof($_GET["ProductCategoryID"]) == 1)  {
      
$_SESSION["WADbSearch1_Products_Cat"]=$_GET["ProductCategoryID"][0];
    }
  }
}
?>



to this

php:
<?php 

if ( isset($_GET["Search"]))  { 
$_SESSION["WADbSearch1_Products_Cat"]=""
if (isset(
$_GET["ProductCategoryID"]))  { 
  if (
$WADbSearch1->whereClause != "")  { 
     
$WADbSearch1->whereClause .= " AND "
  } else  { 
     
$WADbSearch1->whereClause .= " WHERE "
  } 
   for (
$x=0$x<sizeof($_GET["ProductCategoryID"]); $x++)  { 
        
$_GET["ProductCategoryID"][$x] = intval($_GET["ProductCategoryID"][$x]); 
   } 
  
$WADbSearch1->whereClause .= "ProductID IN (SELECT ProductID FROM ps3_productcategories WHERE (CategoryID = ".implode($_GET["ProductCategoryID"]," OR CategoryID = ")."))"
  
$_SESSION["WADbSearch1_Products_Results"]=$WADbSearch1->whereClause
  if (
sizeof($_GET["ProductCategoryID"]) == 1)  { 
     
$_SESSION["WADbSearch1_Products_Cat"]=$_GET["ProductCategoryID"][0]; 
  } 

}
?>



Please give this a try on your products results page then run this check again to see if you get any more vulnerabilities. If you do please post back with the info for them.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...