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