HOME > บทความจากสมาชิก > เปลี่ยนจาก MySQL ไปเป็น MySQLi with Prepare Statement
เปลี่ยนจาก MySQL ไปเป็น MySQLi with Prepare Statement
CWE-89
Improper Neutralization of Special Elements Used in an SQL Command (‘SQL Injection’) (CWE-89): The database server could be compromised or attacked by denial of service due to unvalidated parameters
The validation and sanitization process should be implemented for the user input before processing it (Prepared Statement) or the Type Casting mechanism should be implemented for some input fields. Moreover, the application should conceal any error message, which is generated from the application to be generic error messages and should not reveal any sensitive information such as the type of database, the version of database or any SQL statement error messages.
For PHP programming language, there is PDO function use for protecting the web application from SQL Injection vulnerability.