Hi, just red this at Secunias site:
http://secunia.com/advisories/25412/Seems that we have a problem. Well, no not really as here is the solution:
_dbquery.php, function sql_query($query), add this function to top to disallow ALL union queries. (None found from the system.)
if(strpos(strtolower($query), "union") > 0 ){
die ("Sql error.");
}
To be on the safe side add these also. (Dies if the id is not numeric.)
product.main.php
if( isset($_GET['id_product']) && !is_numeric($_GET['id_product']) ){
die("Invalid product.");
}
category.main.php
if( isset($_GET['id_category']) && !is_numeric($_GET['id_category']) ){
die("Invalid category.");
}
Ofcourse, these checks should be added to every single primary key load, as the key is always number.
Hopefully cpCommerce is little safer again.
- 99