gcr / lua-s3

Simple GET and PUT for Lua / Torch.
30 stars 3 forks source link

"date" in request can differ from "date" in authentication hash #2

Closed kdkeyser closed 8 years ago

kdkeyser commented 8 years ago

hm::generate_header will insert a Date header with a timestamp of the moment it was called. In rare cases, StringToSign might be constructed the second before, which will lead to a mismatch between the StringToSign date and the one included in the HTTP request.

Fixed by overwriting the one returned by generate_header, with the one used to construct StringToSign

gcr commented 8 years ago

Wow, oops! Many thanks for catching this.

Full disclosure: you should know that I don't really rely on this library anymore and it's not under development. If you'd like to help maintain this, I'm more than happy to give you commit rights.