Skip to content

Instantly share code, notes, and snippets.

@anoldguy
Created May 29, 2013 17:42
Show Gist options
  • Save anoldguy/5672201 to your computer and use it in GitHub Desktop.
Save anoldguy/5672201 to your computer and use it in GitHub Desktop.
SQL Injection?
# Is the following safe from SQL injection?
Model.where(Model.arel_table[:name].matches("%#{params[:q]}%"))
@ernie
Copy link

ernie commented May 29, 2013

Nope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment