Simon Willison’s Weblog

Subscribe

Entries tagged hacking, security in 2012

Filters: Type: entry × Year: 2012 × hacking × security × Sorted by date


What are the best practices to avoid XSS and SQL Injections attacks (platform agnostic)?

Input validation is, in my opinion, a red herring. Sure—if you ask the user for an integer or date you should make sure they entered one before attempting to save it anywhere or use it for processing, but injection attacks often involve text fields (e.g. names, or comments posted on Quora) and validating those on input is a recipe for banning “Tim O’Reilly” from ever creating a proper profile on your site!

[... 316 words]

Types

Years

Months

Tags