Thank you for visiting!

Please consider subscribing to the RSS feed or following me on Twitter.

Rules of Programming: Always Validate Input Data!

This one is often forgotten, yet it's one of the most important and fundamental corner stones in programming.

Validating (user) input data is a must. Always assume the input you deal with can make bad things.

What you should think of:

  • Character encoding
  • Encoding and validating HTML data
  • Verifying e-mail addresses and passwords
  • Security risks like Cross-site scripting

Code for bad input first - good input last. You'll help yourself!

Rule #17 of programming:

Always validate input data!

To the top