移除check_sign action

master
anke1460 5 years ago
parent 9b9503bbb1
commit e21dfc9ac8

@ -9,7 +9,6 @@ class Admins::BaseController < ApplicationController
before_action :require_login, :require_admin! before_action :require_login, :require_admin!
after_action :rebind_event_if_ajax_render_partial after_action :rebind_event_if_ajax_render_partial
skip_before_action :check_sign
private private

@ -1,5 +1,4 @@
class Admins::CustomersController < Admins::BaseController class Admins::CustomersController < Admins::BaseController
# skip_before_action :check_sign
helper_method :current_partner helper_method :current_partner
def index def index

@ -21,27 +21,6 @@ class ApplicationController < ActionController::Base
helper_method :current_user helper_method :current_user
# 所有请求必须合法签名
def check_sign
# if !Rails.env.development?
# Rails.logger.info("66666 #{params}")
# # suffix = request.url.split(".").last.split("?").first
# # suffix_arr = ["xls", "xlsx", "pdf", "zip"] # excel文件先注释
# # unless suffix_arr.include?(suffix)
# if params[:client_key].present?
# randomcode = params[:randomcode]
# # tip_exception(501, "请求不合理") unless (Time.now.to_i - randomcode.to_i).between?(0,5)
#
# sign = Digest::MD5.hexdigest("#{OPENKEY}#{randomcode}")
# Rails.logger.info("2222 #{sign}")
# tip_exception(501, "请求不合理") if sign != params[:client_key]
# else
# tip_exception(501, "请求不合理")
# end
# # end
# end
end
# 全局配置参数 # 全局配置参数
# 返回name对应的value # 返回name对应的value
def edu_setting(name) def edu_setting(name)

@ -5,7 +5,6 @@ class AttachmentsController < ApplicationController
before_action :require_login, :check_auth, except: [:show] before_action :require_login, :check_auth, except: [:show]
before_action :find_file, only: %i[show destroy] before_action :find_file, only: %i[show destroy]
before_action :attachment_candown, only: [:show] before_action :attachment_candown, only: [:show]
skip_before_action :check_sign, only: [:show, :create]
include ApplicationHelper include ApplicationHelper

@ -10,7 +10,6 @@ class Cooperative::BaseController < ApplicationController
before_action :laboratory_exist!, :require_login, :require_cooperative_manager! before_action :laboratory_exist!, :require_login, :require_cooperative_manager!
after_action :rebind_event_if_ajax_render_partial after_action :rebind_event_if_ajax_render_partial
skip_before_action :check_sign
helper_method :current_laboratory, :current_setting_or_default helper_method :current_laboratory, :current_setting_or_default

@ -1,6 +1,5 @@
class EduApisController < ApplicationController class EduApisController < ApplicationController
before_action :check_validate before_action :check_validate
skip_before_action :check_sign
skip_before_action :user_setup skip_before_action :user_setup
skip_before_action :setup_laboratory skip_before_action :setup_laboratory

@ -1,7 +1,6 @@
class EduSettingsController < ApplicationController class EduSettingsController < ApplicationController
before_action :require_admin before_action :require_admin
before_action :set_edu_setting, only: [:show, :edit, :update, :destroy] before_action :set_edu_setting, only: [:show, :edit, :update, :destroy]
skip_before_action :check_sign
# GET /edu_settings # GET /edu_settings
# GET /edu_settings.json # GET /edu_settings.json
def index def index

@ -1,5 +1,4 @@
class GitsController < ApplicationController class GitsController < ApplicationController
skip_before_action :check_sign
# 说明: # 说明:
# 以下Git认证只针对新版gitGitlab的Git认证不走该控制器 # 以下Git认证只针对新版gitGitlab的Git认证不走该控制器
# 思路: # 思路:

@ -5,7 +5,6 @@ class HackUserLastestCodesController < ApplicationController
before_action :update_user_hack_status, only: [:code_debug, :code_submit] before_action :update_user_hack_status, only: [:code_debug, :code_submit]
before_action :require_auth_identity, only: [:add_notes] before_action :require_auth_identity, only: [:add_notes]
before_action :require_manager_identity, only: [:show, :update_code, :restore_initial_code, :sync_code] before_action :require_manager_identity, only: [:show, :update_code, :restore_initial_code, :sync_code]
skip_before_action :check_sign, only: [:listen_result]
def show def show
@my_hack.update_attribute(:submit_status, 0) if @my_hack.submit_status == 1 @my_hack.update_attribute(:submit_status, 0) if @my_hack.submit_status == 1

@ -1,5 +1,4 @@
class MainController < ApplicationController class MainController < ApplicationController
skip_before_action :check_sign
skip_before_action :user_setup skip_before_action :user_setup
skip_before_action :setup_laboratory skip_before_action :setup_laboratory
@ -22,11 +21,11 @@ class MainController < ApplicationController
end end
# TODO: 这块之后需要整合者架构重新变化统一跳转到index后再路由分发 # TODO: 这块之后需要整合者架构重新变化统一跳转到index后再路由分发
# if params[:path] && params[:path]&.include?("h5educoderbuild") && params[:path].split("/").first == "h5educoderbuild" if params[:path] && params[:path]&.include?("h5educoderbuild") && params[:path].split("/").first == "h5educoderbuild"
# render file: 'public/h5educoderbuild/index.html', :layout => false render file: 'public/h5educoderbuild/index.html', :layout => false
# else else
# render file: 'public/react/build/index.html', :layout => false render file: 'public/react/build/index.html', :layout => false
# end end
end end
end end

@ -3,7 +3,6 @@ class MyshixunsController < ApplicationController
before_action :find_myshixun, :except => [:training_task_status, :code_runinng_message] before_action :find_myshixun, :except => [:training_task_status, :code_runinng_message]
before_action :find_repo_name, :except => [:training_task_status, :code_runinng_message] before_action :find_repo_name, :except => [:training_task_status, :code_runinng_message]
skip_before_action :verify_authenticity_token, :only => [:html_content] skip_before_action :verify_authenticity_token, :only => [:html_content]
skip_before_action :check_sign, only: [:training_task_status, :code_runinng_message, :html_content]
## TPI关卡列表 ## TPI关卡列表
def challenges def challenges

@ -1,5 +1,4 @@
class PartnersController < ApplicationController class PartnersController < ApplicationController
skip_before_action :check_sign
include Base::PaginateHelper include Base::PaginateHelper
include Admins::RenderHelper include Admins::RenderHelper

@ -1,5 +1,4 @@
class SchoolsController < ApplicationController class SchoolsController < ApplicationController
skip_before_action :check_sign
def school_list def school_list
schools = School.all schools = School.all

@ -28,7 +28,6 @@ class ShixunsController < ApplicationController
before_action :special_allowed, only: [:send_to_course, :search_user_courses] before_action :special_allowed, only: [:send_to_course, :search_user_courses]
before_action :shixun_marker, only: [:new, :create] before_action :shixun_marker, only: [:new, :create]
#before_action :validate_wachat_support, only: [:shixun_exec] #before_action :validate_wachat_support, only: [:shixun_exec]
skip_before_action :check_sign, only: [:download_file]
before_action :user_course_identity, only: [:export_scores] before_action :user_course_identity, only: [:export_scores]
## 获取课程列表 ## 获取课程列表

@ -2,7 +2,6 @@ class UsersController < ApplicationController
before_action :load_user, only: [:show, :homepage_info, :cancel_authentication, :cancel_professional_certification] before_action :load_user, only: [:show, :homepage_info, :cancel_authentication, :cancel_professional_certification]
before_action :check_user_exist, only: [:show, :homepage_info, :cancel_authentication, :cancel_professional_certification] before_action :check_user_exist, only: [:show, :homepage_info, :cancel_authentication, :cancel_professional_certification]
skip_before_action :check_sign, only: [:attachment_show]
# 检查是否更新 # 检查是否更新
def system_update def system_update

Loading…
Cancel
Save