Community Add-Ons

Add file to this package
Top » Features

Pending Order Downloads
for osCommerce Online Merchant v2.2

Will check order status and if it is Pending will not show a download link.

Simple fix to one file...downloads.php

Legend:  Download   Report
Expand All / Collapse All
download.php - minor fix yev 13 Nov 2007  

Some minor security issue.

Attacker was able to download files from pending order, by generating direct url:
download.php?order=40&id=20


/catalog/download.php:

------- Find:
// Die if file is not there
if (!file_exists(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'])) die;

------- Add Below:
// Die if not delivered
require (DIR_WS_CLASSES . 'order.php');
$order = new order ($HTTP_GET_VARS['order']);
if($order->info['orders_status_id'] < 2) die;


Hope that's it!
p.s. Attached file contain fixed download.php.

Forum page josecarlos_pb 24 Jan 2007  
Pending Downloads v2.10 - Language independent Matthias C. Hormann 22 Nov 2004  
Pending order Downloads 2.00 Jeff Thornton 19 May 2004  
Order Pending No Download Jeff Thornton 14 May 2004  
Pending Order Downloads Jeff Thornton 13 May 2004