|
|
|
|
|
by derefr
3786 days ago
|
|
Do prepared statements count as emulated if the DB doesn't support prepared statements, but the DB adapter is doing replacement during the encoding-to-typed-binary-wire-protocol step (i.e. replacement of typed tokens with other typed tokens) rather than by just concatenating strings? |
|
You can stop all known attacks with escaping, but then you run into fun corner cases like http://stackoverflow.com/a/12118602/2224584
What PHP does is silently perform string escaping for you instead of doing a prepared statement. This is stupid, but PHP Internals discussions are painful (so changing it is unlikely to happen any time soon) and the userland fix is easy:
https://github.com/paragonie/easydb/blob/f90fbca34ac7b7b96f7...
If you're sending a 1+N packets (for N >= 1) to your RDBMS for each new query, then you're probably using prepared statements.