If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Payment Modules / bug in custom "card on file" payment module

bug in custom "card on file" payment module

Started by saxtuplet on 6 Mar 2013, 6:37 PM · Views: 683

Results 1 to 3 of 3
6 Mar 2013, 6:37 PM
#1
saxtuplet avatar

saxtuplet

New Zenner

Join Date:
May 2010
Posts:
8
Plugin Contributions:
0

Post #1 by saxtuplet

We had a customer sign up with an apostrophe in their last name and this caused a SQL error in modules/payment/cardonfile.php.

I replaced this on line 39:

	$sql = "SELECT customers_id FROM customers WHERE customers_firstname = '{$order->customer['firstname']}' AND customers_lastname = '{$order->customer['lastname']}'";

with this:

	$lastname = addslashes($order->customer['lastname']);
	$firstname = addslashes($order->customer['firstname']);		
	
	$sql = "SELECT customers_id FROM customers WHERE customers_firstname = '{$firstname}' AND customers_lastname = '{$lastname}'";

We have ver. v1.3.9b.

I am surprised this has not come up before!

6 Mar 2013, 7:42 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #2 by schoolboy

saxtuplet:

I am surprised this has not come up before!

Probably because the module is not a core module, and neither is it available in the plugins area.

Looks like you're the only one using it. Be interested to know where you got it from, and whether your server meets PCI compliances. If not, this presents a massive security risk to your customers.

20 years a Zencart User

7 Mar 2013, 8:44 PM
#3
saxtuplet avatar

saxtuplet

New Zenner

Join Date:
May 2010
Posts:
8
Plugin Contributions:
0

Post #3 by saxtuplet

I just found out this was a custom module added when someone worked on the site's linkpoint integration. Looks like it uses similar logic to the Ceon card module - it just stores the 4 digits at each end of the card number and the admin then looks up the number at linkpoint.