Skip to content

Commit

Permalink
[webui] Fix hakiri issue: Denial of Service
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeuken committed Aug 25, 2015
1 parent afcf669 commit 8a262e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/api/app/controllers/webui/user_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ def requests
}
sorting_field = sortable_fields[params[:iSortCol_0].to_i]
sorting_field ||= :created_at
sorting_dir = params[:sSortDir_0] || :asc
sorting_dir = params[:sSortDir_0].to_sym
sorting_dir = :asc unless ["asc", "desc"].include?(params[:sSortDir_0])
@requests = @displayed_user.requests(params[:sSearch])
@requests_count = @requests.clone.count
@requests = @requests.offset(params[:iDisplayStart].to_i).limit(params[:iDisplayLength].to_i).reorder(sorting_field => sorting_dir.to_sym)
@requests = @requests.offset(params[:iDisplayStart].to_i).limit(params[:iDisplayLength].to_i).reorder(sorting_field => sorting_dir)
respond_to do |format|
# For jquery dataTable
format.json {
Expand Down

0 comments on commit 8a262e5

Please sign in to comment.