)]}'
{"swiftclient/utils.py":[{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"8c22ecab2fd826b3c92c4ca89109d3d618069fee","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        v \u003d value.encode(\u0027utf-8\u0027)"},{"line_number":85,"context_line":"        h \u003d hashlib.sha1(v)"},{"line_number":86,"context_line":"        d \u003d h.hexdigest()"},{"line_number":87,"context_line":"        return name, \"SHA1(%s)\" % d"},{"line_number":88,"context_line":"    else:"},{"line_number":89,"context_line":"        return name, value"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_7630b79e","line":87,"updated":"2014-08-15 17:33:30.000000000","message":"nit: does this imply d is being passed to SHA1()?\n\nAs an alternative, what about \"SHA1:%s\" % d","commit_id":"abdb7528288aa7f247a6d1018e66cc7a2f4bad8f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"e43f8381bcb4f6e2830ce67d735f392ba846a485","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import logging"},{"line_number":19,"context_line":"import time"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import hashlib"},{"line_number":22,"context_line":"import six"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"TRUE_VALUES \u003d set((\u0027true\u0027, \u00271\u0027, \u0027yes\u0027, \u0027on\u0027, \u0027t\u0027, \u0027y\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_473822ef","line":21,"updated":"2014-08-21 07:34:07.000000000","message":"The hashlib module has already been imported above (line 16)","commit_id":"633c61863397a2aa207423c990d6daea9c4c3bed"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"a02a64b24952924a86d170607403e3cf1499ee24","unresolved":false,"context_lines":[{"line_number":131,"context_line":"def safe_header(name, value):"},{"line_number":132,"context_line":"    if name in SENSITIVE_HEADERS:"},{"line_number":133,"context_line":"        v \u003d value.encode(\u0027utf-8\u0027)"},{"line_number":134,"context_line":"        h \u003d hashlib.sha1(v)"},{"line_number":135,"context_line":"        d \u003d h.hexdigest()"},{"line_number":136,"context_line":"        return name, \"SHA1:%s\" % d"},{"line_number":137,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"baa201ad_9b0b6529","line":134,"updated":"2014-10-04 16:33:12.000000000","message":"It is my opinion that using SHA1 to identify tokens is unnecessary for either UUID tokens or PKI tokens. They offer good enough randomness to hit partials for matches when you analyze logs. Simply truncating the token to 8 or 12 characters would be enough. We have an implementation in server-side Swift, in proxy-logging middleware. Seek reveal_sensitive_prefix config for the relevant information.","commit_id":"633c61863397a2aa207423c990d6daea9c4c3bed"}],"tests/unit/test_swiftclient.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"e43f8381bcb4f6e2830ce67d735f392ba846a485","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"        c.put_object(*args)"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"        # NOTE(chmou): SHA1 of someauthtoken defined in ./utils.py"},{"line_number":1219,"context_line":"        sha_str \u003d \u0027SHA1(3da541559918a808c2402bba5012f6c60b27661c)\u0027"},{"line_number":1220,"context_line":""},{"line_number":1221,"context_line":"        # NOTE(chmou): This is the first logging call in http_log"},{"line_number":1222,"context_line":"        # which has the x-auth-token curl line"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_aa037b40","line":1219,"updated":"2014-08-21 07:34:07.000000000","message":"sha_str changed to:\n\n  sha_str \u003d \u0027SHA1:3da541559918a808c2402bba5012f6c60b27661c\u0027","commit_id":"633c61863397a2aa207423c990d6daea9c4c3bed"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"e43f8381bcb4f6e2830ce67d735f392ba846a485","unresolved":false,"context_lines":[{"line_number":1221,"context_line":"        # NOTE(chmou): This is the first logging call in http_log"},{"line_number":1222,"context_line":"        # which has the x-auth-token curl line"},{"line_number":1223,"context_line":"        logging_dict \u003d faked.call_args_list[0][0][0]"},{"line_number":1224,"context_line":"        self.assertIn(sha_str, logging_dict)"},{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"class TestCloseConnection(MockHttpTest):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_0a72af10","line":1224,"updated":"2014-08-21 07:34:07.000000000","message":"This test is failing, the value of faked.call_args_list[0][0] \u003d (\u0027REQ: %s\u0027, \u0027curl -i http://www.test.com/as...12345)\n\nSo you need to get the second one (faked.call_args_list[0][0][1]) according to my debugging which is:\n\n  \u0027curl -i http://www.test.com/asdf/asdf -X PUT -H ...n: SHA1:3da541559918a808c2402bba5012f6c60b27661c\"\u0027\n\nNOTE: I got this info from using the q module, so output is slightly cut up.","commit_id":"633c61863397a2aa207423c990d6daea9c4c3bed"}]}
