Last night we upgraded our codebases with the latest ZF1 version 1.12.7 which triggered all sorts of alarm bells. It took us about half a day to figure out why this was.
We have queries using multi-column ordering, which are now no longer functional because of the security fix ZF2014-04, as it was mentioned in the release notes:
ZF2014-04, which mitigates a potential SQL Injection (SQLi) vector when usiing ORDER BY clauses in Zend_Db_Select; SQL function calls were improperly detected, rendering ORDER clauses such as MD5(1);drop table foo unfiltered. The logic has been updated to prevent SQLi vectors, and users of this functionality are strongly encouraged to upgrade immediately.
Example Zend_Db_Select statements that fail now:
$select->order('productId ASC');
$select->product(array ('productId ASC', 'userId DESC'));
 
This code now translates into the following query
SELECT … ORDER BY 'productId ASC';
 
Which triggers the following MySQL errors:
Mysqli prepare error: Unknown column 'productId ASC'
Mysqli prepare error: Unknown column 'productId ASC, userId DESC'
I can imagine this is not the required result this fix should be!
We can't upgrade at this point.