)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"63ea23ce48e2e3f6473b8a675265ef72b2917503","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     jiangfei \u003cjiangfei0622@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-12 15:01:07 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Log token with sha1"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"By logging the sha1 hash of the token, it can be tracked through"},{"line_number":10,"context_line":"different services."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a80dd14_37af12e5","line":7,"updated":"2015-03-12 15:26:52.000000000","message":"nit:  s/sha1/SHA1/","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"18f55fc40faa9ee82afbc6d19401dd85f827c96a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Log token with sha1"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"By logging the sha1 hash of the token, it can be tracked through"},{"line_number":10,"context_line":"different services."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I6633fa0eda25d994a32d26019cf62ac1d4f760df"},{"line_number":13,"context_line":"Closes-bug: #1429701"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a80dd14_e615d29b","line":10,"updated":"2015-03-12 14:48:55.000000000","message":"How about changing the commit to something like\n\nLog the sha1 hash of X-Auth-Token value\n\nDon\u0027t log sensitive information like the token value from X-Auth-Token. Instead, we log the sha1 hash of the token value, prefixed by \u0027{SHA1}\u0027. This is the convention used within OpenStack, so that the token can be tracked through different services.","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"}],"ironicclient/common/http.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"293c39428edca56c454c59feb2e8eef8a468ba9f","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            raise exc.EndpointException()"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def process_header(self, header):"},{"line_number":102,"context_line":"        \"\"\"Redacts the secure headers to be logged.\"\"\""},{"line_number":103,"context_line":"        secure_headers \u003d (\u0027authorization\u0027, \u0027x-auth-token\u0027,"},{"line_number":104,"context_line":"                          \u0027x-subject-token\u0027,)"},{"line_number":105,"context_line":"        if header[0].lower() in secure_headers:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_d5a26499","line":102,"updated":"2015-03-11 17:22:45.000000000","message":"I think it would be useful to expand on this. How is it being redacted? What is header? What is being returned?\n\nAlso, I don\u0027t think it makes sense to mention \u0027to be logged\u0027 here if this is a method that just \"redacts header\".","commit_id":"2c999abb11f78e760cd982847ad8aa43a64c88e9"},{"author":{"_account_id":13762,"name":"jiangfei","email":"jiangfei0622@huawei.com","username":"jiangfei"},"change_message_id":"13bb57d6c39e9a3ca5ecef097977325fd7fc03a7","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            raise exc.EndpointException()"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def process_header(self, header):"},{"line_number":102,"context_line":"        \"\"\"Redacts the secure headers to be logged.\"\"\""},{"line_number":103,"context_line":"        secure_headers \u003d (\u0027authorization\u0027, \u0027x-auth-token\u0027,"},{"line_number":104,"context_line":"                          \u0027x-subject-token\u0027,)"},{"line_number":105,"context_line":"        if header[0].lower() in secure_headers:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_4d889622","line":102,"in_reply_to":"9a80dd14_d5a26499","updated":"2015-03-12 02:29:38.000000000","message":"Done","commit_id":"2c999abb11f78e760cd982847ad8aa43a64c88e9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"293c39428edca56c454c59feb2e8eef8a468ba9f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def process_header(self, header):"},{"line_number":102,"context_line":"        \"\"\"Redacts the secure headers to be logged.\"\"\""},{"line_number":103,"context_line":"        secure_headers \u003d (\u0027authorization\u0027, \u0027x-auth-token\u0027,"},{"line_number":104,"context_line":"                          \u0027x-subject-token\u0027,)"},{"line_number":105,"context_line":"        if header[0].lower() in secure_headers:"},{"line_number":106,"context_line":"            token_hasher \u003d hashlib.sha1()"},{"line_number":107,"context_line":"            token_hasher.update(header[1].encode(\u0027utf-8\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_c3cd4eb9","line":104,"updated":"2015-03-11 17:22:45.000000000","message":"I see that we emit X-Auth-Token, but where does \u0027authorization\u0027 and \u0027x-subject-token\u0027 come from?","commit_id":"2c999abb11f78e760cd982847ad8aa43a64c88e9"},{"author":{"_account_id":13762,"name":"jiangfei","email":"jiangfei0622@huawei.com","username":"jiangfei"},"change_message_id":"13bb57d6c39e9a3ca5ecef097977325fd7fc03a7","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def process_header(self, header):"},{"line_number":102,"context_line":"        \"\"\"Redacts the secure headers to be logged.\"\"\""},{"line_number":103,"context_line":"        secure_headers \u003d (\u0027authorization\u0027, \u0027x-auth-token\u0027,"},{"line_number":104,"context_line":"                          \u0027x-subject-token\u0027,)"},{"line_number":105,"context_line":"        if header[0].lower() in secure_headers:"},{"line_number":106,"context_line":"            token_hasher \u003d hashlib.sha1()"},{"line_number":107,"context_line":"            token_hasher.update(header[1].encode(\u0027utf-8\u0027))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_8d20ce9c","line":104,"in_reply_to":"9a80dd14_c3cd4eb9","updated":"2015-03-12 02:29:38.000000000","message":"Done","commit_id":"2c999abb11f78e760cd982847ad8aa43a64c88e9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"293c39428edca56c454c59feb2e8eef8a468ba9f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                          \u0027x-subject-token\u0027,)"},{"line_number":105,"context_line":"        if header[0].lower() in secure_headers:"},{"line_number":106,"context_line":"            token_hasher \u003d hashlib.sha1()"},{"line_number":107,"context_line":"            token_hasher.update(header[1].encode(\u0027utf-8\u0027))"},{"line_number":108,"context_line":"            token_hash \u003d token_hasher.hexdigest()"},{"line_number":109,"context_line":"            return (header[0], \u0027{SHA1}%s\u0027 % token_hash)"},{"line_number":110,"context_line":"        return header"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_d525040b","line":107,"updated":"2015-03-11 17:22:45.000000000","message":"I was wondering why you didn\u0027t just do hashlib.sha1(header[1].encode(\u0027utf-8\u0027))","commit_id":"2c999abb11f78e760cd982847ad8aa43a64c88e9"},{"author":{"_account_id":13762,"name":"jiangfei","email":"jiangfei0622@huawei.com","username":"jiangfei"},"change_message_id":"13bb57d6c39e9a3ca5ecef097977325fd7fc03a7","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                          \u0027x-subject-token\u0027,)"},{"line_number":105,"context_line":"        if header[0].lower() in secure_headers:"},{"line_number":106,"context_line":"            token_hasher \u003d hashlib.sha1()"},{"line_number":107,"context_line":"            token_hasher.update(header[1].encode(\u0027utf-8\u0027))"},{"line_number":108,"context_line":"            token_hash \u003d token_hasher.hexdigest()"},{"line_number":109,"context_line":"            return (header[0], \u0027{SHA1}%s\u0027 % token_hash)"},{"line_number":110,"context_line":"        return header"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_aa7018dd","line":107,"in_reply_to":"9a80dd14_d525040b","updated":"2015-03-12 02:29:38.000000000","message":"Done","commit_id":"2c999abb11f78e760cd982847ad8aa43a64c88e9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"293c39428edca56c454c59feb2e8eef8a468ba9f","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            token_hasher \u003d hashlib.sha1()"},{"line_number":107,"context_line":"            token_hasher.update(header[1].encode(\u0027utf-8\u0027))"},{"line_number":108,"context_line":"            token_hash \u003d token_hasher.hexdigest()"},{"line_number":109,"context_line":"            return (header[0], \u0027{SHA1}%s\u0027 % token_hash)"},{"line_number":110,"context_line":"        return header"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def log_curl_request(self, method, url, kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_b8f6c5f7","line":109,"updated":"2015-03-11 17:22:45.000000000","message":"is {SHA1}xyz a convention/format used within OpenStack?","commit_id":"2c999abb11f78e760cd982847ad8aa43a64c88e9"},{"author":{"_account_id":13762,"name":"jiangfei","email":"jiangfei0622@huawei.com","username":"jiangfei"},"change_message_id":"13bb57d6c39e9a3ca5ecef097977325fd7fc03a7","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            token_hasher \u003d hashlib.sha1()"},{"line_number":107,"context_line":"            token_hasher.update(header[1].encode(\u0027utf-8\u0027))"},{"line_number":108,"context_line":"            token_hash \u003d token_hasher.hexdigest()"},{"line_number":109,"context_line":"            return (header[0], \u0027{SHA1}%s\u0027 % token_hash)"},{"line_number":110,"context_line":"        return header"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def log_curl_request(self, method, url, kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_6a66202b","line":109,"in_reply_to":"9a80dd14_b8f6c5f7","updated":"2015-03-12 02:29:38.000000000","message":"@Ruby Loo: it used in nova/glance/cinder etc. you can see:https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/session.py#L152-L189","commit_id":"2c999abb11f78e760cd982847ad8aa43a64c88e9"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"216a2306bd17ba45a707eef27ad32c4c96d722e9","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        except six.moves.http_client.InvalidURL:"},{"line_number":99,"context_line":"            raise exc.EndpointException()"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def process_header(self, header):"},{"line_number":102,"context_line":"        \"\"\"Redacts the secure headers."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        :param header: The header of http request. process the x-auth-token"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_113f7ed7","line":101,"updated":"2015-03-12 15:14:14.000000000","message":"Maybe this should be called:\n\n redact_security_header()\n\nOr something like that.\n\nI don\u0027t like \u0027process_header\u0027 as it gives no idea on what process it is doing.","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"216a2306bd17ba45a707eef27ad32c4c96d722e9","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def process_header(self, header):"},{"line_number":102,"context_line":"        \"\"\"Redacts the secure headers."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        :param header: The header of http request. process the x-auth-token"},{"line_number":105,"context_line":"                       by hashlib.sha1()."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        :returns: the secure header."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_ac74999c","line":104,"updated":"2015-03-12 15:14:14.000000000","message":"... header: A header in the form of a tuple (header name, header value)...","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"18f55fc40faa9ee82afbc6d19401dd85f827c96a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        \"\"\"Redacts the secure headers."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        :param header: The header of http request. process the x-auth-token"},{"line_number":105,"context_line":"                       by hashlib.sha1()."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        :returns: the secure header."},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_e34dc49a","line":105,"updated":"2015-03-12 14:48:55.000000000","message":"I suggest removing the \u0027process the ...\u0027 part from here, and changing the above docstring to something like \n\nRedact any sensitive header.\n\nRedact a header that contains sensitive information, by returning an updated header with the sha1 hash of that value. The redacted value is prefixed by \u0027{SHA1}\u0027 because that\u0027s the convention used within OpenStack.","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"18f55fc40faa9ee82afbc6d19401dd85f827c96a","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        :param header: The header of http request. process the x-auth-token"},{"line_number":105,"context_line":"                       by hashlib.sha1()."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        :returns: the secure header."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_033c98e1","line":107,"updated":"2015-03-12 14:48:55.000000000","message":"s/the secure header/the header (unchanged) or a redacted header/","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"216a2306bd17ba45a707eef27ad32c4c96d722e9","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        :returns: the secure header."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        secure_headers \u003d (\u0027x-auth-token\u0027,)"},{"line_number":112,"context_line":"        if header[0].lower() in secure_headers:"},{"line_number":113,"context_line":"            token_hasher \u003d hashlib.sha1(header[1].encode(\u0027utf-8\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_6cb9c12d","line":110,"updated":"2015-03-12 15:14:14.000000000","message":"To me it would be clearer if work variables were used.  Maybe:\n\n header_name, header_value \u003d header\n\n if header_name.lower() ....","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"216a2306bd17ba45a707eef27ad32c4c96d722e9","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        secure_headers \u003d (\u0027x-auth-token\u0027,)"},{"line_number":112,"context_line":"        if header[0].lower() in secure_headers:"},{"line_number":113,"context_line":"            token_hasher \u003d hashlib.sha1(header[1].encode(\u0027utf-8\u0027))"},{"line_number":114,"context_line":"            token_hash \u003d token_hasher.hexdigest()"},{"line_number":115,"context_line":"            return (header[0], \u0027{SHA1}%s\u0027 % token_hash)"},{"line_number":116,"context_line":"        return header"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_2cdd0971","line":113,"updated":"2015-03-12 15:14:14.000000000","message":"Maybe add:\n .... .encode(\u0027utf-8\u0027, errors\u003d\"ignore\")","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"e0fc3711edea891b60c8f9360b0cfd2ab530660f","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        secure_headers \u003d (\u0027x-auth-token\u0027,)"},{"line_number":112,"context_line":"        if header[0].lower() in secure_headers:"},{"line_number":113,"context_line":"            token_hasher \u003d hashlib.sha1(header[1].encode(\u0027utf-8\u0027))"},{"line_number":114,"context_line":"            token_hash \u003d token_hasher.hexdigest()"},{"line_number":115,"context_line":"            return (header[0], \u0027{SHA1}%s\u0027 % token_hash)"},{"line_number":116,"context_line":"        return header"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_ec0cd196","line":113,"in_reply_to":"9a80dd14_2cdd0971","updated":"2015-03-12 15:20:32.000000000","message":"I wonder if this should actually be decode?\n\n \u003e\u003e\u003e a \u003d \u0027\\x80abc\u0027\n \u003e\u003e\u003e a.encode(\u0027utf-8\u0027, errors\u003d\u0027ignore\u0027)\n Traceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n UnicodeDecodeError: \u0027ascii\u0027 codec can\u0027t decode byte 0x80 in position 0: ordinal not in range(128)","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"7ed4686c86407ce945e3e17461c920c602494ed8","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        prefixed by \u0027{SHA1}\u0027 because that\u0027s the convention used within"},{"line_number":108,"context_line":"        OpenStack."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        :returns: tuple of the header (unchanged) or a redacted header."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        \"\"\""},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da9b358b_5f2639cf","line":110,"range":{"start_line":110,"start_character":39,"end_line":110,"end_character":48},"updated":"2015-03-30 18:23:12.000000000","message":"This seems to be incorrect.  The tuple of the header is NOT returned unchanged.  As now it uses the safe_decode.  Why does it use safe_decode?","commit_id":"a42ee340926baf3c450a264744d0c75be746662d"},{"author":{"_account_id":14271,"name":"Kallebe Monteiro","email":"kallebe.monteiro@lsbd.ufc.br","username":"kallebe"},"change_message_id":"cd88c752c8b2a74fa651d2a1e6b4d2ae24373ae9","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        :returns: A tuple of (name, value)"},{"line_number":111,"context_line":"                  name: the safe encoding format of name"},{"line_number":112,"context_line":"                  value: the redacted value if name is x-auth-token, "},{"line_number":113,"context_line":"                         or the safe encoding format of name"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_30682887","line":112,"updated":"2015-03-31 12:17:22.000000000","message":"Trailing whitespace (red)","commit_id":"91cce9fe5624cd8daa0c368f82cbf770f171dffd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"5ecfcb7fb1b892ad9d8557418e88c8af4aa77f13","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import ssl"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from keystoneclient import adapter"},{"line_number":27,"context_line":"from oslo.utils import encodeutils"},{"line_number":28,"context_line":"import six"},{"line_number":29,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5afe65bd_dee5a5a8","line":27,"updated":"2015-06-02 13:51:03.000000000","message":"oslo_utils","commit_id":"d42bb26cfde1fb6865b19606c42b65d3d6abbb88"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"5ecfcb7fb1b892ad9d8557418e88c8af4aa77f13","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        sensitive_headers \u003d (\u0027x-auth-token\u0027,)"},{"line_number":118,"context_line":"        if name.lower() in sensitive_headers:"},{"line_number":119,"context_line":"            v \u003d value.encode(\u0027utf-8\u0027, errors\u003d\"ignore\")"},{"line_number":120,"context_line":"            h \u003d hashlib.sha1(v)"},{"line_number":121,"context_line":"            d \u003d h.hexdigest()"},{"line_number":122,"context_line":"            return encodeutils.safe_decode(name), \"{SHA1}%s\" % d"}],"source_content_type":"text/x-python","patch_set":7,"id":"5afe65bd_f202d53d","line":119,"updated":"2015-06-02 13:51:03.000000000","message":"Py26 test fails because of this, could you change it to:\n\n v \u003d value.encode(\u0027utf-8\u0027, \u0027ignore\u0027)","commit_id":"d42bb26cfde1fb6865b19606c42b65d3d6abbb88"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"5ecfcb7fb1b892ad9d8557418e88c8af4aa77f13","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            v \u003d value.encode(\u0027utf-8\u0027, errors\u003d\"ignore\")"},{"line_number":120,"context_line":"            h \u003d hashlib.sha1(v)"},{"line_number":121,"context_line":"            d \u003d h.hexdigest()"},{"line_number":122,"context_line":"            return encodeutils.safe_decode(name), \"{SHA1}%s\" % d"},{"line_number":123,"context_line":"        else:"},{"line_number":124,"context_line":"            return (encodeutils.safe_decode(name),"},{"line_number":125,"context_line":"                    encodeutils.safe_decode(value))"}],"source_content_type":"text/x-python","patch_set":7,"id":"5afe65bd_f26895bc","line":122,"updated":"2015-06-02 13:51:03.000000000","message":"Seems that there is no need to do safe_decode, why not just return name here?","commit_id":"d42bb26cfde1fb6865b19606c42b65d3d6abbb88"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"5ecfcb7fb1b892ad9d8557418e88c8af4aa77f13","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            d \u003d h.hexdigest()"},{"line_number":122,"context_line":"            return encodeutils.safe_decode(name), \"{SHA1}%s\" % d"},{"line_number":123,"context_line":"        else:"},{"line_number":124,"context_line":"            return (encodeutils.safe_decode(name),"},{"line_number":125,"context_line":"                    encodeutils.safe_decode(value))"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def log_curl_request(self, method, url, kwargs):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5afe65bd_327ced71","line":124,"updated":"2015-06-02 13:51:03.000000000","message":"ditto, maybe just return (name, value)?","commit_id":"d42bb26cfde1fb6865b19606c42b65d3d6abbb88"}],"ironicclient/tests/unit/test_http.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"18f55fc40faa9ee82afbc6d19401dd85f827c96a","unresolved":false,"context_lines":[{"line_number":232,"context_line":"        self.assertRaises(exc.Unauthorized, client.json_request,"},{"line_number":233,"context_line":"                          \u0027GET\u0027, \u0027/v1/resources\u0027)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def test_process_header_with_auth_token(self):"},{"line_number":236,"context_line":"        header \u003d (\u0027X-Auth-Token\u0027, u\u00273dd65d5837ae40a99677f686bd82ec9d\u0027)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        expected_header \u003d (\u0027X-Auth-Token\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_66f482cf","line":235,"updated":"2015-03-12 14:48:55.000000000","message":"I don\u0027t see the need to put blank lines between every statement in these two tests.","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"e0fc3711edea891b60c8f9360b0cfd2ab530660f","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                          \u0027GET\u0027, \u0027/v1/resources\u0027)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    def test_process_header_with_auth_token(self):"},{"line_number":236,"context_line":"        header \u003d (\u0027X-Auth-Token\u0027, u\u00273dd65d5837ae40a99677f686bd82ec9d\u0027)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        expected_header \u003d (\u0027X-Auth-Token\u0027,"},{"line_number":239,"context_line":"                          u\u0027{SHA1}365929085eeab11b329c8ee0c934911a55b7638d\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_6c762140","line":236,"updated":"2015-03-12 15:20:32.000000000","message":"Can a test be added with a unicode string?\n\n \u003e\u003e\u003e a \u003d \u0027\\x80abc\u0027\n \u003e\u003e\u003e a.decode(\u0027utf-8\u0027)\n Traceback (most recent call last):\n   File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n   File \"/usr/lib64/python2.7/encodings/utf_8.py\", line 16, in decode\n    return codecs.utf_8_decode(input, errors, True)\n UnicodeDecodeError: \u0027utf8\u0027 codec can\u0027t decode byte 0x80 in position 0: invalid start byte\n \u003e\u003e\u003e a.decode(\u0027utf-8\u0027, errors\u003d\u0027ignore\u0027)\nu\u0027abc\u0027","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"18f55fc40faa9ee82afbc6d19401dd85f827c96a","unresolved":false,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        header_redact \u003d client.process_header(header)"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        self.assertEqual(header_redact, expected_header)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def test_process_header_with_no_auth_token(self):"},{"line_number":248,"context_line":"        header \u003d (\u0027Accept\u0027, \u0027application/json\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_86bed6fd","line":245,"updated":"2015-03-12 14:48:55.000000000","message":"Reorder this. The convention is self.assertEqual( \u003cexpected\u003e, \u003cactual\u003e)","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"18f55fc40faa9ee82afbc6d19401dd85f827c96a","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        client \u003d http.HTTPClient(\u0027http://localhost/\u0027)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        header_redact \u003d client.process_header(header)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        self.assertEqual(header_redact, header)"},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_a6b91a17","line":252,"updated":"2015-03-12 14:48:55.000000000","message":"ditto","commit_id":"d29ac2d537ac37688dd26e14fbaccf5a798b05d9"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"7ed4686c86407ce945e3e17461c920c602494ed8","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        header_redact \u003d client.redact_security_header(name, value)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        self.assertEqual(header_redact, expected_header)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def test_process_header_with_no_auth_token(self):"},{"line_number":247,"context_line":"        name, value \u003d (\u0027Accept\u0027, \u0027application/json\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"da9b358b_cbf170cf","line":244,"updated":"2015-03-30 18:23:12.000000000","message":"Convention is: self.assertEqual(\u003cexpected_value\u003e, \u003cactual_value\u003e)\n\nrloo mentioned this in patchset 4","commit_id":"a42ee340926baf3c450a264744d0c75be746662d"}]}
