Issue Details (XML | Word | Printable)

Key: ZF-2692
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Satoru Yoshida
Reporter: Björn Rylander
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

Zend_Db_Profiler::queryStart() uses unsafe method to examine query type.

Created: 20/Feb/08 07:20 AM   Updated: 08/May/09 01:43 AM   Resolved: 08/May/09 01:43 AM
Component/s: Zend_Db_Profiler
Affects Version/s: None
Fix Version/s: 1.8.1

Time Tracking:
Original Estimate: 10 minutes
Original Estimate - 10 minutes
Remaining Estimate: 10 minutes
Remaining Estimate - 10 minutes
Time Spent: Not Specified
Time Spent - Not Specified

Fix Version Priority: Nice to Have


 Description  « Hide

Zend_Db_Profiler::queryStart() takes the first 6 characters in the query string to determine which kind of query it is. This is unsafe because a query might for example start with a parenthesis.
Possible solution: check position of the words INSERT, DELETE, SELECT, and UPDATE. Whichever comes first decides what kind of query it is.



Wil Sinclair added a comment - 25/Mar/08 08:43 PM

Please categorize/fix as needed.


Wil Sinclair added a comment - 04/Dec/08 12:53 PM

Reassigning as Ralph is the maintainer of Zend_Db


Satoru Yoshida added a comment - 08/May/09 01:43 AM

add ltrim() to queryText at SVN r15396 .