Reputation: 1665
I am considering using a MySQL wrapper named Zebra_Database found here:
http://stefangabos.ro/php-libraries/zebra-database/
Can someone tell by the code if this protects against SQL injection or are there further steps I should take to protect myself?
Thanks!!
Upvotes: 1
Views: 403
Reputation: 157914
It encourages the use of prepared statements - the same limited version used by mysqli - so, it offers no 100% protection.
It uses some sort of query builder - so, it makes your SQL too inflexible (and - therefore - insecure again).
Personally I wouldn't use it, but for starter it's better than "wrap each input with mysqli_real_escape_string" anyway.
Upvotes: 2
Reputation: 276496
It encourages the use of prepared statements, which are not susceptible to SQL injection.
From the front page of Zebra_Database:
It encourages developers to write maintainable code and provides a better default security layer by encouraging the use of prepared statements, where parameters are automatically escaped.
Which means you should use prepared statements, which are not susceptible to SQL injection to begin with. See this question about the usage of prepared statements.
Upvotes: 1