Suppose I am doing a server API that accepts and processes full-fledged sql database requests, and not just stored procedures. To ensure security, I have a list of blocked commands (all but select, insert, update, and delete). Assuming that all the string data in the query is safe, I simply cut it out of the query that came to the server so that they do not interfere with the search for dangerous commands. Repex cut lines:
/(\'|").*[^\\]\1/ Is it possible to somehow make a sql query so that string data harms the database?
PS To avoid misunderstandings, by "string data" I mean data that is written inside string literals with ' or " . For example in this query: select * from users where name="Vasya" , "Vasya" is string data.
что-тоto select fromчто-тоwhere a = a; for example - Dmitriy