]> cat aescling's git repositories - mastodon.git/commitdiff
Remove dead code (#8919)
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 8 Oct 2018 02:48:54 +0000 (04:48 +0200)
committerGitHub <noreply@github.com>
Mon, 8 Oct 2018 02:48:54 +0000 (04:48 +0200)
SignatureVerification#matches_time_window? is not called anywhere.

app/controllers/concerns/signature_verification.rb

index 4d77fa43241963d32074b93e6dcee2268fd5eb5c..5f95fa3461ff298c19e6d9595278f8ab22145180 100644 (file)
@@ -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