The Server Pages

»

TheServerPages Articles

»

Webmasters

»

PHP

»

Security

Common Mistakes and their Solutions

Author: Wojjie     Posted: 2004-05-11     Viewed: 19,901

This section will talk about various common vulnerabilites found in PHP sites, and solutions on how to prevent them.

If you are interested in the security of well known PHP applications, there are many resources that you should check on a regular basis. When ever an exploit is found with any program, it gets reported and posted on various security websites, often with solutions on how to fix it.

Here is a good resource for looking up known exploits in widely used PHP applications: SecurityFocus

Most vulnerabilities in PHP code are cause by insufficent input validation procedures (checking the user input). Best practice is to think about what each variable is expected to have and make sure it fits those requirements.

Now to cover some common 'mistakes' people make when coding in PHP and using MySql:

Article Sections:
SQL Injection (2004-05-11)
SQL Injection is when a visitor injects SQL code that manages to get processed by the SQL server.
Cross-Site Scripting (2004-05-12)
Cross-Site Scripting is when a visitor is able to input html/javascript code inito a website and have it display this code.
GET/POST Variable Manipulation (2004-05-13)
When a visitor is able to cheat the website by modifying GET/POST variables that contain sensitive information and therefore change things that he/she should not be able to.

Comments

Copyright © 2004-2015: TheServerPages.com