Chapter 22. Programming Practices

It is very difficult to prepare for every possible attack that can occur against your applications. In fact, if you take the approach of only trying to deny attacks, you will poise yourself in a race against potential attackers whereby the one with the most creativity wins.

A much better approach is to use sound design and programming practices as you develop your application. In fact, this approach can also help you to build more reliable applications, and many security weaknesses turn out to be errors in the software. The following list contains a few general guidelines worth following with respect to Web development. These guidelines are elaborated upon and further explained in the sections that follow.

Get HTTP Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.