)]}'
{"swift/common/middleware/s3api/s3request.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8c270fd512a9f12fb4cc96774939dfa026e10315","unresolved":true,"context_lines":[{"line_number":698,"context_line":"                    raise InvalidRequest("},{"line_number":699,"context_line":"                        \u0027The value specified in the x-amz-trailer \u0027"},{"line_number":700,"context_line":"                        \u0027header is not supported\u0027)"},{"line_number":701,"context_line":"                elif len(trailer_list) \u003e 1:"},{"line_number":702,"context_line":"                    raise InvalidRequest("},{"line_number":703,"context_line":"                        \u0027Expecting a single x-amz-checksum- header. Multiple \u0027"},{"line_number":704,"context_line":"                        \u0027checksum Types are not allowed.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"f69f4f8e_a5e5096f","line":701,"updated":"2025-03-14 00:06:57.000000000","message":"Well now I want to write a test for `x-amz-trailer: , x-amz-checksum-crc32, , `","commit_id":"4d8e0a68b5bced658611aac6ab5f193dffea627e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8c270fd512a9f12fb4cc96774939dfa026e10315","unresolved":true,"context_lines":[{"line_number":703,"context_line":"                        \u0027Expecting a single x-amz-checksum- header. Multiple \u0027"},{"line_number":704,"context_line":"                        \u0027checksum Types are not allowed.\u0027)"},{"line_number":705,"context_line":"                else:"},{"line_number":706,"context_line":"                    expected_trailers.add(trailer_list[0])"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"                if aws_sha256 \u003d\u003d \u0027STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER\u0027:"},{"line_number":709,"context_line":"                    expected_trailers.add(\u0027x-amz-trailer-signature\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"4886d4a3_e1880131","line":706,"updated":"2025-03-14 00:06:57.000000000","message":"Or, `expected_trailers.update(trailer_list)`","commit_id":"4d8e0a68b5bced658611aac6ab5f193dffea627e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3b762ea1e52f41226572e3948a78480393945df5","unresolved":false,"context_lines":[{"line_number":703,"context_line":"                        \u0027Expecting a single x-amz-checksum- header. Multiple \u0027"},{"line_number":704,"context_line":"                        \u0027checksum Types are not allowed.\u0027)"},{"line_number":705,"context_line":"                else:"},{"line_number":706,"context_line":"                    expected_trailers.add(trailer_list[0])"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"                if aws_sha256 \u003d\u003d \u0027STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER\u0027:"},{"line_number":709,"context_line":"                    expected_trailers.add(\u0027x-amz-trailer-signature\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"0b5d47a6_bea4ab6f","line":706,"in_reply_to":"4886d4a3_e1880131","updated":"2025-03-14 11:50:04.000000000","message":"Done","commit_id":"4d8e0a68b5bced658611aac6ab5f193dffea627e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8c270fd512a9f12fb4cc96774939dfa026e10315","unresolved":true,"context_lines":[{"line_number":1410,"context_line":"        return {k: None for k in checksum_headers}"},{"line_number":1411,"context_line":""},{"line_number":1412,"context_line":"    def _install_checksumming_input_wrapper(self):"},{"line_number":1413,"context_line":"        if not self.method \u003d\u003d \u0027PUT\u0027:"},{"line_number":1414,"context_line":"            return"},{"line_number":1415,"context_line":""},{"line_number":1416,"context_line":"        checksum_headers \u003d self._validate_checksum_headers()"}],"source_content_type":"text/x-python","patch_set":1,"id":"a16c5979_1e64907a","line":1413,"updated":"2025-03-14 00:06:57.000000000","message":"This is on me, but we probably want `... !\u003d ...` instead of `not ... \u003d\u003d ...`\n\nWe should probably check out what happens when you send a checksum on a [`DeleteObjects` request](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html) -- or other POSTs...","commit_id":"4d8e0a68b5bced658611aac6ab5f193dffea627e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3b762ea1e52f41226572e3948a78480393945df5","unresolved":true,"context_lines":[{"line_number":1410,"context_line":"        return {k: None for k in checksum_headers}"},{"line_number":1411,"context_line":""},{"line_number":1412,"context_line":"    def _install_checksumming_input_wrapper(self):"},{"line_number":1413,"context_line":"        if not self.method \u003d\u003d \u0027PUT\u0027:"},{"line_number":1414,"context_line":"            return"},{"line_number":1415,"context_line":""},{"line_number":1416,"context_line":"        checksum_headers \u003d self._validate_checksum_headers()"}],"source_content_type":"text/x-python","patch_set":1,"id":"e7dad2ba_460f5cee","line":1413,"in_reply_to":"a16c5979_1e64907a","updated":"2025-03-14 11:50:04.000000000","message":"fixed the not \u003d\u003d","commit_id":"4d8e0a68b5bced658611aac6ab5f193dffea627e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"53738883701345b75bac9e72c94ec91ee4324685","unresolved":false,"context_lines":[{"line_number":1410,"context_line":"        return {k: None for k in checksum_headers}"},{"line_number":1411,"context_line":""},{"line_number":1412,"context_line":"    def _install_checksumming_input_wrapper(self):"},{"line_number":1413,"context_line":"        if not self.method \u003d\u003d \u0027PUT\u0027:"},{"line_number":1414,"context_line":"            return"},{"line_number":1415,"context_line":""},{"line_number":1416,"context_line":"        checksum_headers \u003d self._validate_checksum_headers()"}],"source_content_type":"text/x-python","patch_set":1,"id":"783733cf_23bf1fdb","line":1413,"in_reply_to":"e7dad2ba_460f5cee","updated":"2025-03-14 12:52:08.000000000","message":"Done","commit_id":"4d8e0a68b5bced658611aac6ab5f193dffea627e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8c270fd512a9f12fb4cc96774939dfa026e10315","unresolved":true,"context_lines":[{"line_number":1416,"context_line":"        checksum_headers \u003d self._validate_checksum_headers()"},{"line_number":1417,"context_line":"        checksum_trailer_headers \u003d self._validate_trailer_checksum_headers()"},{"line_number":1418,"context_line":"        if checksum_headers and checksum_trailer_headers:"},{"line_number":1419,"context_line":"            raise InvalidRequest(\u0027Expecting a single x-amz-checksum- header\u0027)"},{"line_number":1420,"context_line":""},{"line_number":1421,"context_line":"        checksum_headers \u003d checksum_headers or checksum_trailer_headers"},{"line_number":1422,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"c404b94c_355f15ba","line":1419,"updated":"2025-03-14 00:06:57.000000000","message":"So this seems to match [what\u0027s happening with `test_different_checksum_requested` on AWS these days](https://review.opendev.org/c/openstack/swift/+/944073/comment/f4735501_0a1f69ca/)... but I\u0027m worried about us not doing the `read(1)`. And I feel like this ought to be calling `_validate_checksum_header_cardinality`...\n\nHave we tested what happens if you both send `x-amz-checksum-sha256` in headers *and* say that you\u0027ll send it in trailers? Ideally, one test with it good in headers and bad in trailers, and another vice versa.","commit_id":"4d8e0a68b5bced658611aac6ab5f193dffea627e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"53738883701345b75bac9e72c94ec91ee4324685","unresolved":true,"context_lines":[{"line_number":1416,"context_line":"        checksum_headers \u003d self._validate_checksum_headers()"},{"line_number":1417,"context_line":"        checksum_trailer_headers \u003d self._validate_trailer_checksum_headers()"},{"line_number":1418,"context_line":"        if checksum_headers and checksum_trailer_headers:"},{"line_number":1419,"context_line":"            raise InvalidRequest(\u0027Expecting a single x-amz-checksum- header\u0027)"},{"line_number":1420,"context_line":""},{"line_number":1421,"context_line":"        checksum_headers \u003d checksum_headers or checksum_trailer_headers"},{"line_number":1422,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"88760144_2eee6e1b","line":1419,"in_reply_to":"a359e555_c78b3bf4","updated":"2025-03-14 12:52:08.000000000","message":"\u003e but I\u0027m worried about us not doing the read(1)\n\nme too, we need to audit all the places we raise and if there\u0027s a read, or...catch all the exceptions in one place and do the read??\n\n\u003eHave we tested what happens if you both send x-amz-checksum-sha256 in headers and say that you\u0027ll send it in trailers? \n\ntest_no_md5_good_sha_crc_in_trailer_and_header_algo_mismatch\n\nadding some other scenarios, but even when the header and trailer declare the *same crc type* the request is 400\u0027d so good/bad values in header/trailer aren\u0027t relevant it seems...see (adding)\n\ntest_no_md5_good_sha_same_crc_in_trailer_and_header","commit_id":"4d8e0a68b5bced658611aac6ab5f193dffea627e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3b762ea1e52f41226572e3948a78480393945df5","unresolved":true,"context_lines":[{"line_number":1416,"context_line":"        checksum_headers \u003d self._validate_checksum_headers()"},{"line_number":1417,"context_line":"        checksum_trailer_headers \u003d self._validate_trailer_checksum_headers()"},{"line_number":1418,"context_line":"        if checksum_headers and checksum_trailer_headers:"},{"line_number":1419,"context_line":"            raise InvalidRequest(\u0027Expecting a single x-amz-checksum- header\u0027)"},{"line_number":1420,"context_line":""},{"line_number":1421,"context_line":"        checksum_headers \u003d checksum_headers or checksum_trailer_headers"},{"line_number":1422,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"a359e555_c78b3bf4","line":1419,"in_reply_to":"c404b94c_355f15ba","updated":"2025-03-14 11:50:04.000000000","message":"Re. ``_validate_checksum_header_cardinality`` - I wanted to do that but annoyingly AWS returns the shorter message in this case vs \u003e1 in headers or \u003e1 in x-amz-trailer. We could parameterise the call to ``_validate_checksum_header_cardinality`` with the message??","commit_id":"4d8e0a68b5bced658611aac6ab5f193dffea627e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8c270fd512a9f12fb4cc96774939dfa026e10315","unresolved":true,"context_lines":[{"line_number":1428,"context_line":"                \u0027headers were found.\u0027)"},{"line_number":1429,"context_line":""},{"line_number":1430,"context_line":"        if not checksum_headers:"},{"line_number":1431,"context_line":"            return"},{"line_number":1432,"context_line":""},{"line_number":1433,"context_line":"        header, b64digest \u003d list(checksum_headers.items())[0]"},{"line_number":1434,"context_line":"        checksum_info \u003d CHECKSUMS_BY_HEADER[header]"}],"source_content_type":"text/x-python","patch_set":1,"id":"fe8f4850_fa8512df","line":1431,"updated":"2025-03-14 00:06:57.000000000","message":"Maybe easier as\n```\nif not checksum_headers:\n    if checksum_algo:\n        raise InvalidRequest(...)\n    return\n```\n? Eh, to each his own.","commit_id":"4d8e0a68b5bced658611aac6ab5f193dffea627e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3b762ea1e52f41226572e3948a78480393945df5","unresolved":false,"context_lines":[{"line_number":1428,"context_line":"                \u0027headers were found.\u0027)"},{"line_number":1429,"context_line":""},{"line_number":1430,"context_line":"        if not checksum_headers:"},{"line_number":1431,"context_line":"            return"},{"line_number":1432,"context_line":""},{"line_number":1433,"context_line":"        header, b64digest \u003d list(checksum_headers.items())[0]"},{"line_number":1434,"context_line":"        checksum_info \u003d CHECKSUMS_BY_HEADER[header]"}],"source_content_type":"text/x-python","patch_set":1,"id":"6a22d6a2_04fe0759","line":1431,"in_reply_to":"fe8f4850_fa8512df","updated":"2025-03-14 11:50:04.000000000","message":"Done","commit_id":"4d8e0a68b5bced658611aac6ab5f193dffea627e"}]}
