New Zenner
- Join Date:
- Mar 2007
- Location:
- Lakeland, FL, US
- Posts:
- 44
- Plugin Contributions:
- 1
[Done v1.3.8] Apostrophes in customer emails results in MySQL errors
ZC Version:
1.3.7
Filename:
/admin/orders.php
Problem:
When updating orders (status), a MySQL error is raised when choosing "notify customer" if the email addresses contains an apostrophy.
Solution:
Properly escape the email address in the resulting sql query used for the customer notification.
Comments:
An apostrophe, though uncommon, is a valid character in an email address. All queries that contain items that may have such characters should always be escaped before the query is executed. Technically, ALL queries should be escaped before execution just to be safe.