From 7742f99aeb7d45faa85ab1d565df5d6c4155a8bf Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 30 Dec 2019 16:53:49 +0800 Subject: [PATCH] 1 --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3bad1718c..65c05ef2a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -28,7 +28,7 @@ class ApplicationController < ActionController::Base Rails.logger.info("111111 #{params[:client_key]}") Rails.logger.info("00000 #{params[:timestamp]}") Rails.logger.info("Time.now - params[:timestamp].to_i: #{Time.now.to_i - params[:timestamp].to_i}") - tip_exception(501, "请求超时") unless (Time.now.to_i - params[:timestamp].to_i).between(0,5) + tip_exception(501, "请求超时") unless (Time.now.to_i - params[:timestamp].to_i).between?(0,5) timestamp = params[:timestamp] sign = Digest::MD5.hexdigest("#{OPENKEY}#{timestamp}") Rails.logger.info("2222 #{sign}")