mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 13:45:44 +08:00
更改:防止sql注入
This commit is contained in:
@@ -25,11 +25,11 @@ class Admins::ProjectsRankController < Admins::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def sort_by
|
def sort_by
|
||||||
params.fetch(:sort_by, "score")
|
DailyProjectStatistic.column_names.include?(params.fetch(:sort_by, "score")) ? params.fetch(:sort_by, "score") : "score"
|
||||||
end
|
end
|
||||||
|
|
||||||
def sort_direction
|
def sort_direction
|
||||||
params.fetch(:sort_direction, "desc")
|
%w(desc asc).include?(params.fetch(:sort_direction, "desc")) ? params.fetch(:sort_direction, "desc") : "desc"
|
||||||
end
|
end
|
||||||
|
|
||||||
def export_excel(data)
|
def export_excel(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user