pgbackrest.git / summary / log / commit / refs

commit    1bd98b61df7aeaec25b6d6b5baa71f8a458784ee
Author:   Andrew Schwartz <andrew@compose.io>
Commit:   David Steele <david@pgmasters.net>
Date:     Sun Jul 01 12:17:27 2018 +0000

    Fix non-compliant ISO-8601 timestamp format in S3 authorization headers.
    
    AWS and some gateways were tolerant of space rather than zero-padded hours while others were not.
    
    Fixed by Andrew Schwartz.


doc/xml/release.xml | 13 +++++++++++++ lib/pgBackRest/Storage/S3/Auth.pm | 2 +- src/perl/embed.auto.c | 2 +- .../pgBackRestTest/Module/Storage/StorageS3AuthPerlTest.pm | 4 ++-- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 8f5e54167..c6edef67e 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -23,6 +23,14 @@ <p>Fix error in selective restore when only one user database exists in the cluster.</p> </release-item> + + <release-item> + <release-item-contributor-list> + <release-item-contributor id="schwartz.andrew"/> + </release-item-contributor-list> + + <p>Fix non-compliant ISO-8601 timestamp format in S3 authorization headers. AWS and some gateways were tolerant of space rather than zero-padded hours while others were not.</p> + </release-item> </release-bug-list> <release-feature-list> @@ -4872,6 +4880,11 @@ <contributor-id type="github">arogozin</contributor-id> </contributor> + <contributor id="schwartz.andrew"> + <contributor-name-display>Andrew Schwartz</contributor-name-display> + <contributor-id type="github">trinchan</contributor-id> + </contributor> + <contributor id="shang.cynthia"> <contributor-name-display>Cynthia Shang</contributor-name-display> <contributor-id type="github">cmwshang</contributor-id> diff --git a/lib/pgBackRest/Storage/S3/Auth.pm b/lib/pgBackRest/Storage/S3/Auth.pm index 7744cc2a2..0dde80ac7 100644 --- a/lib/pgBackRest/Storage/S3/Auth.pm +++ b/lib/pgBackRest/Storage/S3/Auth.pm @@ -62,7 +62,7 @@ sub s3DateTime return logDebugReturn ( $strOperation, - {name => 'strDateTime', value => strftime("%Y%m%dT%k%M%SZ", gmtime($lTime)), trace => true} + {name => 'strDateTime', value => strftime("%Y%m%dT%H%M%SZ", gmtime($lTime)), trace => true} ); } diff --git a/src/perl/embed.auto.c b/src/perl/embed.auto.c index 5d4540474..b314c3e2e 100644 --- a/src/perl/embed.auto.c +++ b/src/perl/embed.auto.c @@ -23733,7 +23733,7 @@ static const EmbeddedModule embeddedModule[] = "return logDebugReturn\n" "(\n" "$strOperation,\n" - "{name => 'strDateTime', value => strftime(\"%Y%m%dT%k%M%SZ\", gmtime($lTime)), trace => true}\n" + "{name => 'strDateTime', value => strftime(\"%Y%m%dT%H%M%SZ\", gmtime($lTime)), trace => true}\n" ");\n" "}\n" "\n" diff --git a/test/lib/pgBackRestTest/Module/Storage/StorageS3AuthPerlTest.pm b/test/lib/pgBackRestTest/Module/Storage/StorageS3AuthPerlTest.pm index 48f2bb857..23254bfe4 100644 --- a/test/lib/pgBackRestTest/Module/Storage/StorageS3AuthPerlTest.pm +++ b/test/lib/pgBackRestTest/Module/Storage/StorageS3AuthPerlTest.pm @@ -31,11 +31,11 @@ sub run ################################################################################################################################ if ($self->begin('s3DateTime')) { - $self->testResult(sub {s3DateTime(1492127085)}, '20170413T234445Z', 'format date/time'); + $self->testResult(sub {s3DateTime(1491267845)}, '20170404T010405Z', 'format date/time'); #--------------------------------------------------------------------------------------------------------------------------- waitRemainder(); - $self->testResult(sub {s3DateTime()}, strftime("%Y%m%dT%k%M%SZ", gmtime()), 'format current date/time'); + $self->testResult(sub {s3DateTime()}, strftime("%Y%m%dT%H%M%SZ", gmtime()), 'format current date/time'); } ################################################################################################################################ [parent: 7e65ddad34db]