)]}'
{"swift/common/middleware/crypto/encrypter.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"3fc9ff94aac78c163a858098a48392275ca61cdd","unresolved":true,"context_lines":[{"line_number":262,"context_line":"        # inform middlewares upstream that data is encrypted"},{"line_number":263,"context_line":"        if is_success(self._get_status_int()):"},{"line_number":264,"context_line":"            crypto_meta \u003d getattr(enc_input_proxy, \u0027body_crypto_meta\u0027, None)"},{"line_number":265,"context_line":"            cipher \u003d crypto_meta and crypto_meta.get(\u0027cipher\u0027)"},{"line_number":266,"context_line":"            if cipher:"},{"line_number":267,"context_line":"                mod_resp_headers.append((\u0027X-Backend-Crypto-Cipher\u0027, cipher))"},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"27fe5280_72f07119","line":265,"updated":"2026-06-10 05:43:16.000000000","message":"Huh, I\u0027ve never used \u0027and\u0027 that way, I know \u0027and\u0027 short curcuits, but never thought to use \u0027and\u0027 simply as a guard for assugnment!\n\nSo if there is no cryto_meta, cipher or cryto_meta comaes back as something falsely then we\u0027re ok. I guess even if cryto_meta comes back as anything truthy then it\u0027ll go to the next check. So bascialy it have to come back either falsey or a dict. If falsy then we just check it fale-ness and throw it away.\n\nThis seems ok, however, is there any chance \u0027body_crypto_meta` could come back as NOT a dict but still truthy? if it does the ceyto_meta.get() will fire an exception. Maybe not, unless there is a json issue.\n\nMaybe we need some belts and braces here, just. in. case? Or maybe I\u0027m just over thinking thing :hmm:","commit_id":"428707d63c039123b1017be0f76a8959da8ae942"},{"author":{"_account_id":39146,"name":"Nathaniel Martes","display_name":"Nate Martes","email":"nmartes@NVIDIA.com","username":"nmartes"},"change_message_id":"2660f616573d9b26c640a9d559d9375bad093cd5","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        # inform middlewares upstream that data is encrypted"},{"line_number":263,"context_line":"        if is_success(self._get_status_int()):"},{"line_number":264,"context_line":"            crypto_meta \u003d getattr(enc_input_proxy, \u0027body_crypto_meta\u0027, None)"},{"line_number":265,"context_line":"            cipher \u003d crypto_meta and crypto_meta.get(\u0027cipher\u0027)"},{"line_number":266,"context_line":"            if cipher:"},{"line_number":267,"context_line":"                mod_resp_headers.append((\u0027X-Backend-Crypto-Cipher\u0027, cipher))"},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"a1f40b7b_0d93a602","line":265,"in_reply_to":"27fe5280_72f07119","updated":"2026-06-10 15:29:34.000000000","message":"Yes I agree, I think we can add a wrapper around the statement to say:\n```python\ncipher \u003d isinstance(crypto_meta, dict) and crypto_meta.get(\u0027cipher\u0027)\n```\n\nWhich would make sure crypto_meta a `dict` and in the event it is not, it will return `False` instead of `None` which are both false-y values.","commit_id":"428707d63c039123b1017be0f76a8959da8ae942"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"f2fb0105de662fec8a2d65751e7ea00836535cfb","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        # inform middlewares upstream that data is encrypted"},{"line_number":263,"context_line":"        if is_success(self._get_status_int()):"},{"line_number":264,"context_line":"            crypto_meta \u003d getattr(enc_input_proxy, \u0027body_crypto_meta\u0027, None)"},{"line_number":265,"context_line":"            cipher \u003d isinstance(crypto_meta, dict) and crypto_meta.get(\u0027cipher\u0027)"},{"line_number":266,"context_line":"            if cipher:"},{"line_number":267,"context_line":"                mod_resp_headers.append((\u0027X-Backend-Crypto-Cipher\u0027, cipher))"},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"0a7b3e25_71be8e4f","line":265,"updated":"2026-06-10 16:59:43.000000000","message":"pep8: E501 line too long (80 \u003e 79 characters)","commit_id":"6baa9466e6409fe9ffd8f660e7266906d3bf38c9"}],"test/unit/common/middleware/crypto/test_encrypter.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"eb149e0c46d299c5d2ca701d5af65e0753949a1f","unresolved":false,"context_lines":[{"line_number":658,"context_line":"                return_value\u003dbody_key):"},{"line_number":659,"context_line":"            resp \u003d req.get_response(self.encrypter)"},{"line_number":660,"context_line":"        self.assertEqual(\u0027201 Created\u0027, resp.status)"},{"line_number":661,"context_line":"        self.assertEqual(Crypto.cipher, resp.headers[\u0027X-Backend-Crypto-Cipher\u0027])"},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"    def test_POST_req(self):"},{"line_number":664,"context_line":"        body \u003d b\u0027FAKE APP\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"fe3636fb_7dd2f875","line":661,"updated":"2026-06-08 23:23:48.000000000","message":"pep8: E501 line too long (80 \u003e 79 characters)","commit_id":"14ba1ae4d7225554904317060ba072e979114a7b"}],"test/unit/common/middleware/s3api/test_obj.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"fda740202443d552115c3a6fc52983770cc13c16","unresolved":true,"context_lines":[{"line_number":2074,"context_line":"        self.addCleanup(setattr, self.s3api, \u0027app\u0027, orig_app)"},{"line_number":2075,"context_line":""},{"line_number":2076,"context_line":"        self.swift.register("},{"line_number":2077,"context_line":"            \u0027HEAD\u0027, \u0027/v1/AUTH_test/bucket/test-object\u0027, swob.HTTPOk,"},{"line_number":2078,"context_line":"            self.response_headers, self.object_body)"},{"line_number":2079,"context_line":""},{"line_number":2080,"context_line":"        req \u003d Request.blank("}],"source_content_type":"text/x-python","patch_set":2,"id":"3c775a47_94582429","line":2077,"updated":"2026-06-09 14:49:20.000000000","message":"This registers a HEAD request...","commit_id":"14ba1ae4d7225554904317060ba072e979114a7b"},{"author":{"_account_id":39146,"name":"Nathaniel Martes","display_name":"Nate Martes","email":"nmartes@NVIDIA.com","username":"nmartes"},"change_message_id":"c5a00cd81e453ea037db6bdd9eab117b48fe3371","unresolved":false,"context_lines":[{"line_number":2074,"context_line":"        self.addCleanup(setattr, self.s3api, \u0027app\u0027, orig_app)"},{"line_number":2075,"context_line":""},{"line_number":2076,"context_line":"        self.swift.register("},{"line_number":2077,"context_line":"            \u0027HEAD\u0027, \u0027/v1/AUTH_test/bucket/test-object\u0027, swob.HTTPOk,"},{"line_number":2078,"context_line":"            self.response_headers, self.object_body)"},{"line_number":2079,"context_line":""},{"line_number":2080,"context_line":"        req \u003d Request.blank("}],"source_content_type":"text/x-python","patch_set":2,"id":"9b152907_4341fd82","line":2077,"in_reply_to":"3c775a47_94582429","updated":"2026-06-09 17:58:20.000000000","message":"Acknowledged","commit_id":"14ba1ae4d7225554904317060ba072e979114a7b"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"fda740202443d552115c3a6fc52983770cc13c16","unresolved":true,"context_lines":[{"line_number":2079,"context_line":""},{"line_number":2080,"context_line":"        req \u003d Request.blank("},{"line_number":2081,"context_line":"            \u0027/bucket/test-object\u0027,"},{"line_number":2082,"context_line":"            environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027PUT\u0027},"},{"line_number":2083,"context_line":"            headers\u003d{\u0027Authorization\u0027: \u0027AWS test:tester:hmac\u0027,"},{"line_number":2084,"context_line":"                     \u0027Date\u0027: self.get_date_header()})"},{"line_number":2085,"context_line":"        status, headers, body \u003d self.call_s3api(req)"}],"source_content_type":"text/x-python","patch_set":2,"id":"391c40ff_850d3d0b","line":2082,"updated":"2026-06-09 14:49:20.000000000","message":"...but then a PUT request is used. I think the HEAD in line 2077 needs to be changed to PUT, tests will fail otherwise.","commit_id":"14ba1ae4d7225554904317060ba072e979114a7b"},{"author":{"_account_id":39146,"name":"Nathaniel Martes","display_name":"Nate Martes","email":"nmartes@NVIDIA.com","username":"nmartes"},"change_message_id":"c5a00cd81e453ea037db6bdd9eab117b48fe3371","unresolved":false,"context_lines":[{"line_number":2079,"context_line":""},{"line_number":2080,"context_line":"        req \u003d Request.blank("},{"line_number":2081,"context_line":"            \u0027/bucket/test-object\u0027,"},{"line_number":2082,"context_line":"            environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027PUT\u0027},"},{"line_number":2083,"context_line":"            headers\u003d{\u0027Authorization\u0027: \u0027AWS test:tester:hmac\u0027,"},{"line_number":2084,"context_line":"                     \u0027Date\u0027: self.get_date_header()})"},{"line_number":2085,"context_line":"        status, headers, body \u003d self.call_s3api(req)"}],"source_content_type":"text/x-python","patch_set":2,"id":"518f1cba_2462f39b","line":2082,"in_reply_to":"391c40ff_850d3d0b","updated":"2026-06-09 17:58:20.000000000","message":"Acknowledged","commit_id":"14ba1ae4d7225554904317060ba072e979114a7b"}]}
