mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 18:13:42 +01:00
Remove dead code (#8919)
SignatureVerification#matches_time_window? is not called anywhere.
This commit is contained in:
parent
2dba313100
commit
a00ce8c92c
1 changed files with 0 additions and 10 deletions
|
@ -87,16 +87,6 @@ module SignatureVerification
|
||||||
end.join("\n")
|
end.join("\n")
|
||||||
end
|
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
|
def body_digest
|
||||||
"SHA-256=#{Digest::SHA256.base64digest(request_body)}"
|
"SHA-256=#{Digest::SHA256.base64digest(request_body)}"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue