From a00ce8c92c06f42109aad5cfe65d46862cf037bb Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 8 Oct 2018 04:48:54 +0200 Subject: Remove dead code (#8919) SignatureVerification#matches_time_window? is not called anywhere. --- app/controllers/concerns/signature_verification.rb | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'app/controllers/concerns') diff --git a/app/controllers/concerns/signature_verification.rb b/app/controllers/concerns/signature_verification.rb index 4d77fa432..5f95fa346 100644 --- a/app/controllers/concerns/signature_verification.rb +++ b/app/controllers/concerns/signature_verification.rb @@ -87,16 +87,6 @@ module SignatureVerification end.join("\n") end - def matches_time_window? - begin - time_sent = DateTime.httpdate(request.headers['Date']) - rescue ArgumentError - return false - end - - (Time.now.utc - time_sent).abs <= 30 - end - def body_digest "SHA-256=#{Digest::SHA256.base64digest(request_body)}" end -- cgit