This question is to resolve the dispute between me and the employee.
Let's say we have the following query executed on a standard LAMP server.
SELECT field1, field2, field3
FROM some_table
WHERE some_table.field1 = 123
ORDER BY field2 DESC
LIMIT 0, 15
Now suppose the limit clause is vulnerable to SQL injection.
LIMIT [insert anything here], [also insert anything here]
My colleague's point is that there is no way to use this injection, so there is no need to avoid it (since it requires more computing power, etc.).
I think her reasoning is stupid, but I cannot figure out how to prove my mistake by finding an example.
I can’t use UNION, because the query uses the sentence ORDER BY, and the MySQL user executing the query does not have privileges FILE, so the use is INTO OUTFILEalso out of the question.
, - , ?
: PHP, .