Reprinted from: Https://bbs.ichunqiu.com/thread-12105-1-1.html What is SQL injectionSQL Injection Basic IntroductionStructured Query Language (structuredquery Language, abbreviation: SQL) is a special programming language for standard data query
With the rapid development of Web applications and the continuous maturation of technology, the demand for web development-related jobs is increasing, and more and more people are joining the ranks of web development. However, due to the uneven
In the development of the Web site, we may give a person a security problem, let me introduce some common SQL injection attack method Summary, novice friends can try to reference.
1. Escape characters are not properly filtered
This form of injection
1. The MAGIC_QUOTES_GPC option in PHP tutorial configuration file php.ini is not turned on and is set to off 2. The developer does not check and escape the data type
But in fact, the 2nd is the most important. I think that checking the type of data
SQL injection is an attack that allows an attacker to add additional logical expressions and commands to an existing SQL query, the kind of attack that can succeed whenever a user submits data that is not properly validated, and sticks to a
Summarize your experience. In my opinion, the main reason for the SQL injection attack is due to the following two reasons:
1. The MAGIC_QUOTES_GPC option in PHP config file php.ini is not turned on and is set to off
2. The developer does not check
1. The MAGIC_QUOTES_GPC option in the PHP tutorial configuration file php.ini is not turned on and is set to off 2. The developer did not check and escape the data type
But in fact, the 2nd is the most important. I think that it is the most basic
Webjxcom Tip: Programmers write code with TDD (test-driven development): Before a function is implemented, a test case is written before the code is written to run it through. In fact, when the hacker SQL injection, is also a TDD process: they will
(1) mysql_real_escape_string--Escape the special characters in the string used in the SQL statement, taking into account that the current character set of the connection is used as follows:? 123$sql= "SELECT COUNT (*) asctr from users where Username=
PHP and SQL injection attacks. SQL injection attacks are the most common means for hackers to attack websites. If your site does not use strict user input tests, it is often vulnerable to SQL injection attacks. SQL injection attacks are usually the
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.