One of the most common security problems for dynamic sites is SQL Injection. Thankfully Rails does everything it can in solving this issue, but you still need to be aware of it.
# tasks_controller.rb
def index
@tasks = Task.find(:all, :conditions => ["name LIKE ?", "%#{params[:query]}%"])
end
本文讨论了动态网站常见的安全问题——SQL注入,并介绍了Rails框架为解决这一问题所采取的措施。即便如此,开发者仍需提高警惕,确保应用程序的安全。
452

被折叠的 条评论
为什么被折叠?



