Skip to content

Commit

Permalink
Fixes #23028 - Properly escape params passed to where (CVE-2018-1096) (
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpovolny authored and tbrisker committed Mar 27, 2018
1 parent 9dc411a commit 274665e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/dashboard_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def save_positions
errors = []
filter = self.class.widget_params_filter
params.fetch(:widgets, []).each do |id, values|
widget = User.current.widgets.where("id = #{id}").first
widget = User.current.widgets.where(:id => id).first
values = filter.filter_params(values, parameter_filter_context, :none)
errors << widget.errors unless widget.update_attributes(values)
end
Expand Down

0 comments on commit 274665e

Please sign in to comment.