Answer the question
In order to leave comments, you need to log in
Encoding data before putting into mysql
Good afternoon!
A few years ago I came across an article on Habré, in which it was advised to filter all user-entered data, and then encode it before placing it in MySQL. I don't remember the encoding type, either base64 or urlencode. This should completely cut off several types of attacks with "wrong" characters inside the data. Moreover, this type of encoding is supported by both PHP and MySQL, which allows you to perform a full-fledged search inside the table. Remind me, please, of the link to the article.
Answer the question
In order to leave comments, you need to log in
Base64 encode before query, decode with mysql at query time (http://dev.mysql.com/doc/refman/5.6/en/string-functions.html#function_from-base64)
Thank you, this is exactly what I was looking for. Although here they offered a more native option. But thanks anyway.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question