The third part of the Writing Secure PHP series, covering weak
passwords, clients and more advanced topics.
In How to write secure code in Php-1, 2 and 3 I covered many of the
basic mistakes PHP developers make, and how to avoid common security problems.
It is time to get a little deeper into security though, and begin to tackle
some more advanced issues.
Context
Before I start, it is
worth mentioning at this point in this series that much of what is to come is
highly dependant on context. If you are running a small personal site and are
regularly backing it up, the chances are that there is no real benefit to you
spending weeks on advanced security issues. If an attacker can gain nothing
(and cause no harm) by compromising your site, and it would only take you ten
minutes to restore it, should something go wrong, then it would be a waste to
spend too long on security concerns. At the other end of the scale, if you are
managing an ecommerce site that processes thousands of credit cards a day, then
it is negligent not to spend a lot of time researching and improving your
site's security.