)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15830,"name":"jiaxi","email":"jiaxi@unitedstack.com","username":"jiaxi"},"change_message_id":"ec8e58da8ce5e46af3182ed73a2caa76e5ebbe40","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Check Fernet token for None"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Missing Fernet token in token validation call gives HTTP 500 error due"},{"line_number":10,"context_line":"to invalid input handling. I\u0027ve fix it and added some tests on it."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I02006e5158d6403e44d419d323653657e985a4f3"},{"line_number":13,"context_line":"Closes-Bug: 1474942"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a50d1a3_0ae6b5af","line":10,"updated":"2015-07-29 08:13:15.000000000","message":"fix -\u003e fixed","commit_id":"723a4afb55c851f2c774f5a8c0d6d7058a8bcd42"},{"author":{"_account_id":11708,"name":"Atsuko Ito","email":"me@yottatsa.name","username":"yottatsa"},"change_message_id":"ed1d9a0624b41976783acf4e3b2c938aef1e18d3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Check Fernet token for None"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Missing Fernet token in token validation call gives HTTP 500 error due"},{"line_number":10,"context_line":"to invalid input handling. I\u0027ve fix it and added some tests on it."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I02006e5158d6403e44d419d323653657e985a4f3"},{"line_number":13,"context_line":"Closes-Bug: 1474942"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a50d1a3_c53c3eca","line":10,"in_reply_to":"3a50d1a3_0ae6b5af","updated":"2015-07-29 08:19:21.000000000","message":"Done","commit_id":"723a4afb55c851f2c774f5a8c0d6d7058a8bcd42"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"7552acf183650f9301be566340e6f10e60e6ee94","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Explicitly check incorrect token input"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Missing or incorrect Fernet token in token validation call gives"},{"line_number":10,"context_line":"HTTP 500 error due to invalid input handling. I\u0027ve fix it and"},{"line_number":11,"context_line":"added some tests on it."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I02006e5158d6403e44d419d323653657e985a4f3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da20952f_a0009703","line":10,"updated":"2015-09-09 17:58:32.000000000","message":"I don\u0027t think we should use first person in commit messages. Rewrite to \"This patch fixes...\"","commit_id":"c1df6acd27889b0044bf42bc1ead39a1d4d00457"},{"author":{"_account_id":16523,"name":"ZhangLei","display_name":"ZhangLei","email":"zhang.lei@99cloud.net","username":"zhang.lei"},"change_message_id":"24f9b38098281b99a1593711d0c416cde849e4cd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Explicitly check incorrect token input"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Missing or incorrect Fernet token in token validation call gives"},{"line_number":10,"context_line":"HTTP 500 error due to invalid input handling. I\u0027ve fix it and"},{"line_number":11,"context_line":"added some tests on it."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I02006e5158d6403e44d419d323653657e985a4f3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a8ffd7b_2a368152","line":10,"updated":"2015-11-26 06:44:08.000000000","message":"yeah, it does not need to explain what you do.\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Information_in_commit_messages","commit_id":"c1df6acd27889b0044bf42bc1ead39a1d4d00457"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"e2f6a854849c2d322a8315ce5d892905aacbfc02","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Explicitly check incorrect token input"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Missing or incorrect Fernet token in token validation call gives"},{"line_number":10,"context_line":"HTTP 500 error due to invalid input handling. I\u0027ve fix it and"},{"line_number":11,"context_line":"added some tests on it."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I02006e5158d6403e44d419d323653657e985a4f3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a8ffd7b_38f116ce","line":10,"in_reply_to":"9a8ffd7b_2a368152","updated":"2015-12-01 19:00:13.000000000","message":"Done","commit_id":"c1df6acd27889b0044bf42bc1ead39a1d4d00457"}],"keystone/tests/unit/test_v3_auth.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"136c2750cd007a6f9d1578b8370a9fb345055b21","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        self.assertValidProjectScopedTokenResponse(r, require_catalog\u003dFalse)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def test_validate_missing_token(self):"},{"line_number":357,"context_line":"        self.get(\u0027/auth/tokens\u0027, expected_status\u003d404)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"class AllowRescopeScopedTokenDisabledTests(test_v3.RestfulTestCase):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_37ebb1a5","line":357,"updated":"2015-07-29 20:35:47.000000000","message":"it\u0027s not clear which (or both) token(s) is intended to be missing - X-Auth-Token or X-Subject-Token. a comment, a more explicit method name and/or additional test cases would be beneficial","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"82afae1cf7a8242f55b2d1d0558d37328629d5fb","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        self.assertValidProjectScopedTokenResponse(r, require_catalog\u003dFalse)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def test_validate_missing_token(self):"},{"line_number":357,"context_line":"        self.get(\u0027/auth/tokens\u0027, expected_status\u003d404)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"class AllowRescopeScopedTokenDisabledTests(test_v3.RestfulTestCase):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_15e68216","line":357,"in_reply_to":"3a50d1a3_37ebb1a5","updated":"2015-07-30 16:04:16.000000000","message":"++","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"},{"author":{"_account_id":11708,"name":"Atsuko Ito","email":"me@yottatsa.name","username":"yottatsa"},"change_message_id":"332ae2e1cdbd949c3e7063b059385713a8ede921","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        self.assertValidProjectScopedTokenResponse(r, require_catalog\u003dFalse)"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def test_validate_missing_token(self):"},{"line_number":357,"context_line":"        self.get(\u0027/auth/tokens\u0027, expected_status\u003d404)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"class AllowRescopeScopedTokenDisabledTests(test_v3.RestfulTestCase):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_44b469d3","line":357,"in_reply_to":"3a50d1a3_37ebb1a5","updated":"2015-07-30 17:37:33.000000000","message":"Done","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"7b852ee859a32b01b4128b9f220a805277f30584","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                          auth_info.get_method_data,"},{"line_number":115,"context_line":"                          method_name)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"class TokenAPITests(object):"},{"line_number":119,"context_line":"    # Why is this not just setUP? Because TokenAPITests is not a test class"},{"line_number":120,"context_line":"    # itself. If TokenAPITests became a subclass of the testcase, it would get"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_9a108c50","line":117,"updated":"2015-11-07 03:02:12.000000000","message":"Actually there is something very weird here. This class isn\u0027t used anywhere! May anyone else confirm this ?","commit_id":"c1df6acd27889b0044bf42bc1ead39a1d4d00457"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"e2f6a854849c2d322a8315ce5d892905aacbfc02","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                          auth_info.get_method_data,"},{"line_number":115,"context_line":"                          method_name)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"class TokenAPITests(object):"},{"line_number":119,"context_line":"    # Why is this not just setUP? Because TokenAPITests is not a test class"},{"line_number":120,"context_line":"    # itself. If TokenAPITests became a subclass of the testcase, it would get"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_b8b3c609","line":117,"in_reply_to":"da85f559_9a108c50","updated":"2015-12-01 19:00:13.000000000","message":"nope, it seems to be inherited by token type-specific tests.","commit_id":"c1df6acd27889b0044bf42bc1ead39a1d4d00457"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"b49d44daddc2a96d9190767a0db1f7e04e1de3fd","unresolved":false,"context_lines":[{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def test_validate_missing_subject_token(self):"},{"line_number":417,"context_line":"        self.get(\u0027/auth/tokens\u0027, expected_status\u003d404)"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"class AllowRescopeScopedTokenDisabledTests(test_v3.RestfulTestCase):"},{"line_number":421,"context_line":"    def config_overrides(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_5a93db5b","line":418,"updated":"2015-12-04 12:10:02.000000000","message":"A test for missing X-Auth-Token is also needed, according to the bug report title.","commit_id":"44fa70c4d4cae07284a1c3866e608e872894f92d"}],"keystone/tests/unit/token/test_fernet_provider.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"136c2750cd007a6f9d1578b8370a9fb345055b21","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        self.assertRaises("},{"line_number":47,"context_line":"            exception.TokenNotFound,"},{"line_number":48,"context_line":"            self.provider.validate_v3_token,"},{"line_number":49,"context_line":"            None)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def test_missing_v2_token_raises_404(self):"},{"line_number":52,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_177555f8","line":49,"updated":"2015-07-29 20:35:47.000000000","message":"we usually don\u0027t pass constants without at least naming them. in this case, it\u0027s not clear *what* is None without knowing validate_v3_tokens() method signature, so to make it more clear:\n\n  token \u003d None\n  self.assertRaises(\n      exception.TokenNotFound,\n      self.provider.validate_v3_token,\n      token)","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"},{"author":{"_account_id":11708,"name":"Atsuko Ito","email":"me@yottatsa.name","username":"yottatsa"},"change_message_id":"332ae2e1cdbd949c3e7063b059385713a8ede921","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        self.assertRaises("},{"line_number":47,"context_line":"            exception.TokenNotFound,"},{"line_number":48,"context_line":"            self.provider.validate_v3_token,"},{"line_number":49,"context_line":"            None)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def test_missing_v2_token_raises_404(self):"},{"line_number":52,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_04e501db","line":49,"in_reply_to":"3a50d1a3_177555f8","updated":"2015-07-30 17:37:33.000000000","message":"Done","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"136c2750cd007a6f9d1578b8370a9fb345055b21","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self.assertRaises("},{"line_number":53,"context_line":"            exception.TokenNotFound,"},{"line_number":54,"context_line":"            self.provider.validate_v2_token,"},{"line_number":55,"context_line":"            None)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def test_invalid_v3_token_raises_404(self):"},{"line_number":58,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_57567d5c","line":55,"updated":"2015-07-29 20:35:47.000000000","message":"same","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"},{"author":{"_account_id":11708,"name":"Atsuko Ito","email":"me@yottatsa.name","username":"yottatsa"},"change_message_id":"332ae2e1cdbd949c3e7063b059385713a8ede921","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        self.assertRaises("},{"line_number":53,"context_line":"            exception.TokenNotFound,"},{"line_number":54,"context_line":"            self.provider.validate_v2_token,"},{"line_number":55,"context_line":"            None)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def test_invalid_v3_token_raises_404(self):"},{"line_number":58,"context_line":"        self.assertRaises("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_24ea7dad","line":55,"in_reply_to":"3a50d1a3_57567d5c","updated":"2015-07-30 17:37:33.000000000","message":"Done","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"}],"keystone/token/providers/fernet/token_formatters.py":[{"author":{"_account_id":15830,"name":"jiaxi","email":"jiaxi@unitedstack.com","username":"jiaxi"},"change_message_id":"ec8e58da8ce5e46af3182ed73a2caa76e5ebbe40","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        \"\"\"Validates a Fernet token and returns the payload attributes.\"\"\""},{"line_number":171,"context_line":"        # Convert v2 unicode token to a string"},{"line_number":172,"context_line":"        if not token:"},{"line_number":173,"context_line":"            raise exception.ValidationError(_(\u0027Token is not provided\u0027))"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        if not isinstance(token, six.binary_type):"},{"line_number":176,"context_line":"            token \u003d token.encode(\u0027ascii\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_4a659d1b","line":173,"updated":"2015-07-29 08:13:15.000000000","message":"Token is None, then why is it ValidationError, not NotFoundError?\nJust discuss.","commit_id":"723a4afb55c851f2c774f5a8c0d6d7058a8bcd42"},{"author":{"_account_id":11708,"name":"Atsuko Ito","email":"me@yottatsa.name","username":"yottatsa"},"change_message_id":"ed1d9a0624b41976783acf4e3b2c938aef1e18d3","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        \"\"\"Validates a Fernet token and returns the payload attributes.\"\"\""},{"line_number":171,"context_line":"        # Convert v2 unicode token to a string"},{"line_number":172,"context_line":"        if not token:"},{"line_number":173,"context_line":"            raise exception.ValidationError(_(\u0027Token is not provided\u0027))"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        if not isinstance(token, six.binary_type):"},{"line_number":176,"context_line":"            token \u003d token.encode(\u0027ascii\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_45282e86","line":173,"in_reply_to":"3a50d1a3_4a659d1b","updated":"2015-07-29 08:19:21.000000000","message":"Because ValidationError has been caught on https://github.com/openstack/keystone/blob/master/keystone/token/providers/fernet/core.py#L188","commit_id":"723a4afb55c851f2c774f5a8c0d6d7058a8bcd42"},{"author":{"_account_id":11387,"name":"Sam Leong","email":"chio-fai-sam.leong@hpe.com","username":"Chioleong"},"change_message_id":"4ee87aa4462f9ce221f95d3faebac0bebc7f7e86","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def validate_token(self, token):"},{"line_number":170,"context_line":"        \"\"\"Validates a Fernet token and returns the payload attributes.\"\"\""},{"line_number":171,"context_line":"        # Convert v2 unicode token to a string"},{"line_number":172,"context_line":"        if isinstance(token, six.text_type):"},{"line_number":173,"context_line":"            token \u003d token.encode(\u0027ascii\u0027)"},{"line_number":174,"context_line":"        if not isinstance(token, six.binary_type):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_3a1ba374","line":171,"updated":"2015-07-29 17:06:04.000000000","message":"token here can be None, it should throw an Unauthorized exception in this case.","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"},{"author":{"_account_id":11387,"name":"Sam Leong","email":"chio-fai-sam.leong@hpe.com","username":"Chioleong"},"change_message_id":"b77bc3eee36a079e05c5d60bcabc388d2a0d2ad2","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def validate_token(self, token):"},{"line_number":170,"context_line":"        \"\"\"Validates a Fernet token and returns the payload attributes.\"\"\""},{"line_number":171,"context_line":"        # Convert v2 unicode token to a string"},{"line_number":172,"context_line":"        if isinstance(token, six.text_type):"},{"line_number":173,"context_line":"            token \u003d token.encode(\u0027ascii\u0027)"},{"line_number":174,"context_line":"        if not isinstance(token, six.binary_type):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_3a4723bd","line":171,"in_reply_to":"3a50d1a3_3a1ba374","updated":"2015-07-29 17:20:33.000000000","message":"I\u0027m going to take back the -1 as this fix seems to have taken care of the None case. And ValidationError makes sense.","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"136c2750cd007a6f9d1578b8370a9fb345055b21","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        # Convert v2 unicode token to a string"},{"line_number":172,"context_line":"        if isinstance(token, six.text_type):"},{"line_number":173,"context_line":"            token \u003d token.encode(\u0027ascii\u0027)"},{"line_number":174,"context_line":"        if not isinstance(token, six.binary_type):"},{"line_number":175,"context_line":"            raise exception.ValidationError("},{"line_number":176,"context_line":"                _(\u0027This is not a recognized Fernet token\u0027))"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_979c050f","line":174,"updated":"2015-07-29 20:35:47.000000000","message":"could you not do this check first, bail early, and simplify this method as a result?","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"82afae1cf7a8242f55b2d1d0558d37328629d5fb","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        # Convert v2 unicode token to a string"},{"line_number":172,"context_line":"        if isinstance(token, six.text_type):"},{"line_number":173,"context_line":"            token \u003d token.encode(\u0027ascii\u0027)"},{"line_number":174,"context_line":"        if not isinstance(token, six.binary_type):"},{"line_number":175,"context_line":"            raise exception.ValidationError("},{"line_number":176,"context_line":"                _(\u0027This is not a recognized Fernet token\u0027))"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_95b4d2d4","line":174,"in_reply_to":"3a50d1a3_979c050f","updated":"2015-07-30 16:04:16.000000000","message":"++","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"},{"author":{"_account_id":11708,"name":"Atsuko Ito","email":"me@yottatsa.name","username":"yottatsa"},"change_message_id":"332ae2e1cdbd949c3e7063b059385713a8ede921","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        # Convert v2 unicode token to a string"},{"line_number":172,"context_line":"        if isinstance(token, six.text_type):"},{"line_number":173,"context_line":"            token \u003d token.encode(\u0027ascii\u0027)"},{"line_number":174,"context_line":"        if not isinstance(token, six.binary_type):"},{"line_number":175,"context_line":"            raise exception.ValidationError("},{"line_number":176,"context_line":"                _(\u0027This is not a recognized Fernet token\u0027))"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_040ae179","line":174,"in_reply_to":"3a50d1a3_979c050f","updated":"2015-07-30 17:37:33.000000000","message":"Done","commit_id":"dc1b38a986d904fbc332a83e3de2afd26bd0f318"},{"author":{"_account_id":8978,"name":"Marek Denis","email":"marek.denis+openstack@gmail.com","username":"marek-denis"},"change_message_id":"d0d500dd51bd1171556a719481394f56d1f4242f","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        # Check that token is string"},{"line_number":172,"context_line":"        if not isinstance(token, (six.binary_type, six.text_type)):"},{"line_number":173,"context_line":"            raise exception.ValidationError("},{"line_number":174,"context_line":"                _(\u0027This is not a recognized Fernet token\u0027))"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        # Convert v2 unicode token to a string"},{"line_number":177,"context_line":"        if isinstance(token, six.text_type):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_e172397c","line":174,"updated":"2015-08-04 08:56:33.000000000","message":"Why not provide a hint what\u0027s expected token format (text)?","commit_id":"c1df6acd27889b0044bf42bc1ead39a1d4d00457"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"808b89c98b9d9bc1ffda30ef64de7685269e4aa3","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        # Check that token is string"},{"line_number":172,"context_line":"        if not isinstance(token, (six.binary_type, six.text_type)):"},{"line_number":173,"context_line":"            raise exception.ValidationError("},{"line_number":174,"context_line":"                _(\u0027This is not a recognized Fernet token\u0027))"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        # Convert v2 unicode token to a string"},{"line_number":177,"context_line":"        if isinstance(token, six.text_type):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_ee408f36","line":174,"in_reply_to":"1a4dcd0f_e172397c","updated":"2015-08-05 13:39:51.000000000","message":"Is this something that should be applied to all tokens? What do we do when a token isn\u0027t a binary_type or a text_type? I imagine this would be useful for the other token formats, too? Maybe this should be moved somewhere were it can be leveraged by all token providers instead of only the Fernet provider.","commit_id":"c1df6acd27889b0044bf42bc1ead39a1d4d00457"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"7b852ee859a32b01b4128b9f220a805277f30584","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        # Check that token is string"},{"line_number":172,"context_line":"        if not isinstance(token, (six.binary_type, six.text_type)):"},{"line_number":173,"context_line":"            raise exception.ValidationError("},{"line_number":174,"context_line":"                _(\u0027This is not a recognized Fernet token\u0027))"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        # Convert v2 unicode token to a string"},{"line_number":177,"context_line":"        if isinstance(token, six.text_type):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_660c3443","line":174,"in_reply_to":"1a4dcd0f_ee408f36","updated":"2015-11-07 03:02:12.000000000","message":"Maybe we should just check that the token is not None ?\nWhat kind of object can arrive here other than (None, six.binary_type, six.text_type) ?\n\nI also agree with Marek and Lance suggestions.","commit_id":"c1df6acd27889b0044bf42bc1ead39a1d4d00457"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"e2f6a854849c2d322a8315ce5d892905aacbfc02","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        # Check that token is string"},{"line_number":172,"context_line":"        if not isinstance(token, (six.binary_type, six.text_type)):"},{"line_number":173,"context_line":"            raise exception.ValidationError("},{"line_number":174,"context_line":"                _(\u0027This is not a recognized Fernet token\u0027))"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        # Convert v2 unicode token to a string"},{"line_number":177,"context_line":"        if isinstance(token, six.text_type):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_389fd660","line":174,"in_reply_to":"da85f559_660c3443","updated":"2015-12-01 19:00:13.000000000","message":"Done","commit_id":"c1df6acd27889b0044bf42bc1ead39a1d4d00457"}]}
