have email addresses and access to SMTP server • You have usernames and passwords • You have credit card data • You're an activist or minority, or majority, left wing or right • You really DO have something to hide Friday, July 19, 13
easier" • Don't send passwords via email (unless you use email encryption) • Use the same password for different services • keep unencrypted customer data on your laptop Friday, July 19, 13
"%#{params[:name]}%") This is called Parameter Escaping (and it is GOOD) Detailed info: http://rails-sqli.org/ http://railscasts.com/episodes/25-sql-injection Friday, July 19, 13
much anything if you let users get javascript on to the page • Rails by default protects you • But there are many cases where you can bypass it (legitimately) <%= raw @product.name %> <%= @product.name.html_safe %> <%= content_tag @product.name %> WARNING Friday, July 19, 13
"insecure" branch • Use the SQL / search query below to test SQL Injection • Play with XSS by inserting JavaScript into the post and see what chaos you can make! foo%'); INSERT INTO posts (id,title,body,created_at,updated_at) VALUES (99,'hacked','hacked alright','2013-07-18','2013-07-18'); SELECT "posts".* FROM "posts" WHERE (title like '%anything Friday, July 19, 13