Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Move expires timestamp in SignatureV4 to be generated before startTimestamp #1325
As described in issue #1322 an edge case of using exactly 1 week expiration when a second rolls between
…mestamp for edge case of second roll overs. As described in issue #1322 an edge case of using exactly 1 week expiration when a second rolls between the startTimestamp calculation via time() and the expires timestamp can cause incorrect exceptions. This occurs when the second rolls over (ie 12:01:01.9999999 to 12:02:02.00000) between the startTime (time()) and endTime conversion from strtotime(). This causes the exception of the expiration must be less than a week to be thrown. By moving the endTime to be converted before startTime this guarantees that will never occur.
@@ Coverage Diff @@ ## master #1325 +/- ## ============================================ + Coverage 91.87% 91.87% +<.01% - Complexity 2465 2466 +1 ============================================ Files 142 142 Lines 7518 7523 +5 ============================================ + Hits 6907 6912 +5 Misses 611 611