Skip to content

Commit

Permalink
Remove dead code (mastodon#8919)
Browse files Browse the repository at this point in the history
SignatureVerification#matches_time_window? is not called anywhere.
  • Loading branch information
Gargron authored Oct 8, 2018
1 parent 2dba313 commit a00ce8c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions app/controllers/concerns/signature_verification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,6 @@ def build_signed_string(signed_headers)
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
Expand Down

0 comments on commit a00ce8c

Please sign in to comment.