diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-03-01 21:43:25 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-03 02:11:50 +0900 |
commit | a114c988b4c17e37508f1d0f96b93fd8b96d2df9 (patch) | |
tree | 047062ccd14d568849c18a39590d72a2e132d1dc /app | |
parent | d15c120f72a375b6c9634e9aaeaeb159bb0c1998 (diff) | |
download | gitlab-ce-a114c988b4c17e37508f1d0f96b93fd8b96d2df9.tar.gz |
Fixed SQL injection
Diffstat (limited to 'app')
-rw-r--r-- | app/finders/pipelines_finder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/finders/pipelines_finder.rb b/app/finders/pipelines_finder.rb index 4a44a469a48..5408cc09096 100644 --- a/app/finders/pipelines_finder.rb +++ b/app/finders/pipelines_finder.rb @@ -103,9 +103,9 @@ class PipelinesFinder if params[:order_by].present? && params[:sort].present? && items.column_names.include?(params[:order_by]) && (params[:sort].casecmp('ASC') || params[:sort].casecmp('DESC')) - items.order("#{params[:order_by]} #{params[:sort]}") + items.reorder(params[:order_by] => params[:sort]) else - items.order(id: :desc) + items.reorder(id: :desc) end end end |