时间戳问题

dev_cxt
jingquan huang 5 years ago
parent 0c7e2b4a15
commit 93b58cdd87

@ -23,7 +23,7 @@ class ApplicationController < ActionController::Base
# 所有请求必须合法签名
def check_sign
timestamp = Time.now.to_i
timestamp = params[:timestamp]
sign = Digest::MD5.hexdigest("#{OPENKEY}#{timestamp}")
tip_exception(501, "请求不合理") if sign != params[:client_key]
end

Loading…
Cancel
Save