Skip to content

Update R5 SQLi Documentation #314

Open
@nvisium-john-poulin

Description

@nvisium-john-poulin

The proposed solutions do not work, as they rely on the no-longer existing user_id parameter, throwing the following error:

Failure/Error: user = User.find(id: params[:user][:user_id])

ActiveRecord::RecordNotFound:
Couldn't find User with 'id'={:id=>nil}

Refactor these to be in the following syntax. Also note, we no longer need to specify the column name since we're searching on primary key :

user = User.find(params[:user][:id])
user = User.where("id = ?", params[:user][:id]).first

https://github.com/OWASP/railsgoat/wiki/R5-A1-SQL-Injection-Concatentation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions