Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expires time is calculated twice when using expires_in and can cause signature authentication problems #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/aws/s3/authentication.rb
Expand Up @@ -115,7 +115,7 @@ def initialize(*args)
# 3) The current time in seconds since the epoch plus the default number of seconds (60 seconds) # 3) The current time in seconds since the epoch plus the default number of seconds (60 seconds)
def expires def expires
return options[:expires] if options[:expires] return options[:expires] if options[:expires]
date.to_i + expires_in @expires ||= date.to_i + expires_in
end end


def expires_in def expires_in
Expand Down Expand Up @@ -218,4 +218,4 @@ def only_path
end end
end end
end end
end end