Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Writing Secure(r) Rails Apps

Jon Canady
September 16, 2013

Writing Secure(r) Rails Apps

Three quick rules to keep in mind to ensure your Rails apps are just a little bit more secure.

Jon Canady

September 16, 2013
Tweet

More Decks by Jon Canady

Other Decks in Programming

Transcript

  1. In Review User input is dangerous. Even after it’s saved

    to the database! Sunday, September 15, 13
  2. before_filter :require_admin private def require_admin unless current_user.admin? flash[:error] = "You

    must be logged in to access this section" redirect_to root_url end end Sunday, September 15, 13
  3. class Ability include CanCan::Ability def initialize user can :read, Post,

    account_id: user.account_id end end Sunday, September 15, 13
  4. In Review Restrict what users can access Validate incoming data

    Keep your secrets secret Sunday, September 15, 13