Advertisement
saasbook

sql_injection.rb

Jul 11th, 2012
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.17 KB | None | 0 0
  1. class MoviesController
  2.   def search
  3.     movies = Movie.where("name = '#{params[:title]}'") # UNSAFE!
  4.     # movies = Movie.where("name = ?", params[:title])   # safe
  5.   end
  6. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement