)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"514a976e8930b1b9eadc8621a3158160ecc013d7","unresolved":false,"context_lines":[{"line_number":9,"context_line":"We hash a token under multiple configurable algorithms for revocations"},{"line_number":10,"context_line":"and caching and so must check all of them. This hash generation was"},{"line_number":11,"context_line":"being done and returned by the cache check and reused in revocation"},{"line_number":12,"context_line":"check."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change validate so that we generate the hash values in the main function"},{"line_number":15,"context_line":"and pass that to the cache and revocation functions."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9af37de9_63cbea73","line":12,"updated":"2015-05-10 12:50:32.000000000","message":"the commit message should say why the change is being made.","commit_id":"afbe5711a6544aea0870527a8a256acfaf609a99"}],"keystonemiddleware/auth_token/__init__.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"514a976e8930b1b9eadc8621a3158160ecc013d7","unresolved":false,"context_lines":[{"line_number":806,"context_line":"            raise"},{"line_number":807,"context_line":"        except Exception:"},{"line_number":808,"context_line":"            self._LOG.debug(\u0027Token validation failure.\u0027, exc_info\u003dTrue)"},{"line_number":809,"context_line":"            if token_hashes[0]:"},{"line_number":810,"context_line":"                self._token_cache.store_invalid(token_hashes[0])"},{"line_number":811,"context_line":"            self._LOG.warn(_LW(\u0027Authorization failed for token\u0027))"},{"line_number":812,"context_line":"            raise exc.InvalidToken(_(\u0027Token authorization failed\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9af37de9_439fc65f","line":809,"updated":"2015-05-10 12:50:32.000000000","message":"How could token_hashes[0] be falsy? Add a comment.\n\nI think this change is changing behavior by moving the token hashing out of the try/except block. In the original code if there was an exception hashing tokens it would go into this block. So one option to preserve the original behavior is to do:\n\n token_hashes \u003d None\n try:\n     token_hashes \u003d self._token_hashes(token)\n     cached \u003d self._token_cache.get(token_hashes)\n ...\n except Exception:\n    self._LOG.debug(\u0027Token validation failure.\u0027, exc_info\u003dTrue)\n    if token_hashes:\n        ...\n\nbecause token_hashes would remain None if there was an exception during token hashing.","commit_id":"afbe5711a6544aea0870527a8a256acfaf609a99"}],"keystonemiddleware/auth_token/_cache.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"a17ceb3f71229fcd0b3ec8dabaf8bb373a6f6b60","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        \"\"\""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        for token in token_hashes:"},{"line_number":160,"context_line":"            # user_token is either a UUID token or a hashed PKI token."},{"line_number":161,"context_line":"            cached \u003d self._cache_get(token)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"            if cached:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_65bf29d1","line":160,"updated":"2015-05-06 22:14:58.000000000","message":"there\u0027s no user_token anymore, so this comment is referring to something that doesn\u0027t exist.","commit_id":"af63bbf50417af960397b7e052b63c37ab919a56"}]}
