From: Tom Clegg Date: Fri, 18 Jun 2021 02:59:00 +0000 (-0400) Subject: Merge branch '17810-s3-escape-non-unreserved-chars' X-Git-Tag: 2.3.0~183 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/e45ba3bbf5aa851bdf8de7612eb6b587b615ba21 Merge branch '17810-s3-escape-non-unreserved-chars' fixes #17810 Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- e45ba3bbf5aa851bdf8de7612eb6b587b615ba21 diff --cc services/keep-web/s3_test.go index 4f70168b56,d336c5f09f..f411fde871 --- a/services/keep-web/s3_test.go +++ b/services/keep-web/s3_test.go @@@ -558,12 -558,15 +558,15 @@@ func (s *IntegrationSuite) TestS3Normal rawPath string normalizedPath string }{ - {"/foo", "/foo"}, // boring case - {"/foo%5fbar", "/foo_bar"}, // _ must not be escaped - {"/foo%2fbar", "/foo/bar"}, // / must not be escaped - {"/(foo)", "/%28foo%29"}, // () must be escaped - {"/foo%5bbar", "/foo%5Bbar"}, // %XX must be uppercase + {"/foo", "/foo"}, // boring case + {"/foo%5fbar", "/foo_bar"}, // _ must not be escaped + {"/foo%2fbar", "/foo/bar"}, // / must not be escaped + {"/(foo)/[];,", "/%28foo%29/%5B%5D%3B%2C"}, // ()[];, must be escaped + {"/foo%5bbar", "/foo%5Bbar"}, // %XX must be uppercase - {"//foo///bar", "/foo/bar"}, // "//" and "///" must be squashed to "/" ++ {"//foo///.bar", "/foo/.bar"}, // "//" and "///" must be squashed to "/" } { + c.Logf("trial %q", trial) + date := time.Now().UTC().Format("20060102T150405Z") scope := "20200202/zzzzz/S3/aws4_request" canonicalRequest := fmt.Sprintf("%s\n%s\n%s\n%s\n%s\n%s", "GET", trial.normalizedPath, "", "host:host.example.com\n", "host", "")