SQL injection problem?

Source: Internet
Author: User
Tags sql injection

Cause:

Programmers use splicing SQL statement problems, such as: the "+" number splicing, then user input, the program may not be able to tell what is the data, what is the statement, resulting in injection.

Solution (tentative):

Parameterization is an important part of anti-SQL injection framework-level scenarios (but parameterization is not a good way to meet some common requirements in the development process, such as the comma-separated ID list problem, sorting tag issues, and so on)
1. Check the variable data type and format (as long as there are fixed-format variables, before the SQL statement execution, you should strictly follow the fixed format to check, to ensure that the variable is the format we expect)
2. Filter Special symbols
3. Binding variables, using precompiled statements

For more information, please refer to :https://www.zhihu.com/question/22953267

SQL injection problem?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.