)]}'
{"nova/db/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"073c1830c292baeab15b68b36544b2fc3c097612","unresolved":false,"context_lines":[{"line_number":2054,"context_line":"    return IMPL.console_auth_token_create(context, values)"},{"line_number":2055,"context_line":""},{"line_number":2056,"context_line":""},{"line_number":2057,"context_line":"def console_auth_token_get_valid(context, token_hash, instance_uuid):"},{"line_number":2058,"context_line":"    return IMPL.console_auth_token_get_valid(context,"},{"line_number":2059,"context_line":"                                             token_hash,"},{"line_number":2060,"context_line":"                                             instance_uuid)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_a103ba0e","line":2057,"updated":"2016-06-21 21:27:35.000000000","message":"nit: docstrings on DB API methods would be nice, especially for this once since I\u0027m not sure what it does from just reading this.","commit_id":"0f477a34cb4dba080edb5a21220b3764939b2ee1"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"8e32261ed790f68378c3fd26626b3fd485682ff3","unresolved":false,"context_lines":[{"line_number":2054,"context_line":"    return IMPL.console_auth_token_create(context, values)"},{"line_number":2055,"context_line":""},{"line_number":2056,"context_line":""},{"line_number":2057,"context_line":"def console_auth_token_get_valid(context, token_hash, instance_uuid):"},{"line_number":2058,"context_line":"    return IMPL.console_auth_token_get_valid(context,"},{"line_number":2059,"context_line":"                                             token_hash,"},{"line_number":2060,"context_line":"                                             instance_uuid)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_c11e8d62","line":2057,"in_reply_to":"3aaa91ec_a103ba0e","updated":"2016-06-22 17:09:23.000000000","message":"Done","commit_id":"0f477a34cb4dba080edb5a21220b3764939b2ee1"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"71fe607230f38218096cdcaac4ebfb2577c24997","unresolved":false,"context_lines":[{"line_number":6982,"context_line":"def console_auth_token_get_valid(context, token_hash, instance_uuid):"},{"line_number":6983,"context_line":"    return context.session.query(models.ConsoleAuthToken).\\"},{"line_number":6984,"context_line":"        filter_by(token_hash\u003dtoken_hash).\\"},{"line_number":6985,"context_line":"        filter_by(instance_uuid\u003dinstance_uuid).\\"},{"line_number":6986,"context_line":"        filter(models.ConsoleAuthToken.expires \u003e timeutils.utcnow_ts()).\\"},{"line_number":6987,"context_line":"        first()"},{"line_number":6988,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_647e406b","line":6985,"updated":"2016-06-08 14:55:46.000000000","message":"You are going to use two distinguish indexes. If you have the token_hash no need to also filter by instance_uuid since you have a constraint of uniq. OR you should to create an index based of token_hash + instance_uuid (which is probably useless).","commit_id":"547a962b276b15e3da5d78e0855ba0bc1cd0ffe3"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"143e6086ecc2f482d2bbae4f125cb7ab6d7dbddb","unresolved":false,"context_lines":[{"line_number":6982,"context_line":"def console_auth_token_get_valid(context, token_hash, instance_uuid):"},{"line_number":6983,"context_line":"    return context.session.query(models.ConsoleAuthToken).\\"},{"line_number":6984,"context_line":"        filter_by(token_hash\u003dtoken_hash).\\"},{"line_number":6985,"context_line":"        filter_by(instance_uuid\u003dinstance_uuid).\\"},{"line_number":6986,"context_line":"        filter(models.ConsoleAuthToken.expires \u003e timeutils.utcnow_ts()).\\"},{"line_number":6987,"context_line":"        first()"},{"line_number":6988,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_f41e335d","line":6985,"in_reply_to":"7aa08908_647e406b","updated":"2016-06-09 11:03:48.000000000","message":"I\u0027m not sure either case applies. You are right, the token_hash is unique and has an index. You are also right that extending that index to cover instance_uuid as well is pointless because the token_hash already guarantees at most one row qualifies. The filters on instance_uuid and expires are further validation checks. The user might be presenting a token and instance that do not match.","commit_id":"547a962b276b15e3da5d78e0855ba0bc1cd0ffe3"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"71fe607230f38218096cdcaac4ebfb2577c24997","unresolved":false,"context_lines":[{"line_number":6996,"context_line":"@pick_context_manager_writer"},{"line_number":6997,"context_line":"def console_auth_token_destroy_expired_by_host(context, host):"},{"line_number":6998,"context_line":"    context.session.query(models.ConsoleAuthToken).\\"},{"line_number":6999,"context_line":"        filter_by(host\u003dhost).\\"},{"line_number":7000,"context_line":"        filter(models.ConsoleAuthToken.expires \u003c\u003d timeutils.utcnow_ts()).\\"},{"line_number":7001,"context_line":"        delete()"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_e44fd031","line":6999,"updated":"2016-06-08 14:55:46.000000000","message":"Based on your previous commit related to the schema of the database the index is false, you should to create an index based of the combination of host+expires","commit_id":"547a962b276b15e3da5d78e0855ba0bc1cd0ffe3"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"143e6086ecc2f482d2bbae4f125cb7ab6d7dbddb","unresolved":false,"context_lines":[{"line_number":6996,"context_line":"@pick_context_manager_writer"},{"line_number":6997,"context_line":"def console_auth_token_destroy_expired_by_host(context, host):"},{"line_number":6998,"context_line":"    context.session.query(models.ConsoleAuthToken).\\"},{"line_number":6999,"context_line":"        filter_by(host\u003dhost).\\"},{"line_number":7000,"context_line":"        filter(models.ConsoleAuthToken.expires \u003c\u003d timeutils.utcnow_ts()).\\"},{"line_number":7001,"context_line":"        delete()"}],"source_content_type":"text/x-python","patch_set":8,"id":"7aa08908_743363f6","line":6999,"in_reply_to":"7aa08908_e44fd031","updated":"2016-06-09 11:03:48.000000000","message":"Agreed. And I will get rid of the expires index. This is all in the preceeding review through.","commit_id":"547a962b276b15e3da5d78e0855ba0bc1cd0ffe3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"073c1830c292baeab15b68b36544b2fc3c097612","unresolved":false,"context_lines":[{"line_number":6808,"context_line":""},{"line_number":6809,"context_line":"@pick_context_manager_writer"},{"line_number":6810,"context_line":"def console_auth_token_create(context, values):"},{"line_number":6811,"context_line":"    instance_uuid \u003d values.get(\u0027instance_uuid\u0027, \u0027\u0027)"},{"line_number":6812,"context_line":"    _check_instance_exists_in_project(context, instance_uuid)"},{"line_number":6813,"context_line":"    token_ref \u003d models.ConsoleAuthToken()"},{"line_number":6814,"context_line":"    token_ref.update(values)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_014a8e83","line":6811,"range":{"start_line":6811,"start_character":48,"end_line":6811,"end_character":50},"updated":"2016-06-21 21:27:35.000000000","message":"This is weird, instance_uuid is a non-nullable column on the table, so why would we allow checking for instance by uuid \u0027\u0027?","commit_id":"0f477a34cb4dba080edb5a21220b3764939b2ee1"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"8e32261ed790f68378c3fd26626b3fd485682ff3","unresolved":false,"context_lines":[{"line_number":6808,"context_line":""},{"line_number":6809,"context_line":"@pick_context_manager_writer"},{"line_number":6810,"context_line":"def console_auth_token_create(context, values):"},{"line_number":6811,"context_line":"    instance_uuid \u003d values.get(\u0027instance_uuid\u0027, \u0027\u0027)"},{"line_number":6812,"context_line":"    _check_instance_exists_in_project(context, instance_uuid)"},{"line_number":6813,"context_line":"    token_ref \u003d models.ConsoleAuthToken()"},{"line_number":6814,"context_line":"    token_ref.update(values)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_ee02a23d","line":6811,"range":{"start_line":6811,"start_character":48,"end_line":6811,"end_character":50},"in_reply_to":"3aaa91ec_014a8e83","updated":"2016-06-22 17:09:23.000000000","message":"ok, will assume there is an instance_uuid and rely on key error in db if not.","commit_id":"0f477a34cb4dba080edb5a21220b3764939b2ee1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"073c1830c292baeab15b68b36544b2fc3c097612","unresolved":false,"context_lines":[{"line_number":6817,"context_line":""},{"line_number":6818,"context_line":""},{"line_number":6819,"context_line":"@pick_context_manager_reader"},{"line_number":6820,"context_line":"def console_auth_token_get_valid(context, token_hash, instance_uuid):"},{"line_number":6821,"context_line":"    return context.session.query(models.ConsoleAuthToken).\\"},{"line_number":6822,"context_line":"        filter_by(token_hash\u003dtoken_hash).\\"},{"line_number":6823,"context_line":"        filter_by(instance_uuid\u003dinstance_uuid).\\"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_245cf824","line":6820,"range":{"start_line":6820,"start_character":54,"end_line":6820,"end_character":67},"updated":"2016-06-21 21:27:35.000000000","message":"Why don\u0027t we have to check _check_instance_exists_in_project on this? Same question for below methods also. I\u0027m asking because for tags we check that for any method that passes an instance_uuid in.","commit_id":"0f477a34cb4dba080edb5a21220b3764939b2ee1"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"8e32261ed790f68378c3fd26626b3fd485682ff3","unresolved":false,"context_lines":[{"line_number":6817,"context_line":""},{"line_number":6818,"context_line":""},{"line_number":6819,"context_line":"@pick_context_manager_reader"},{"line_number":6820,"context_line":"def console_auth_token_get_valid(context, token_hash, instance_uuid):"},{"line_number":6821,"context_line":"    return context.session.query(models.ConsoleAuthToken).\\"},{"line_number":6822,"context_line":"        filter_by(token_hash\u003dtoken_hash).\\"},{"line_number":6823,"context_line":"        filter_by(instance_uuid\u003dinstance_uuid).\\"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_ce09a633","line":6820,"range":{"start_line":6820,"start_character":54,"end_line":6820,"end_character":67},"in_reply_to":"3aaa91ec_245cf824","updated":"2016-06-22 17:09:23.000000000","message":"Agree for this function. The next two are garbage collection - so don\u0027t think we need to check the instance exists in the project.","commit_id":"0f477a34cb4dba080edb5a21220b3764939b2ee1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"34e8d99beb837c946b65a421cd191a2ef1f719b3","unresolved":false,"context_lines":[{"line_number":1682,"context_line":"def _check_instance_exists_in_project(context, instance_uuid):"},{"line_number":1683,"context_line":"    if not model_query(context, models.Instance, read_deleted\u003d\"no\","},{"line_number":1684,"context_line":"                       project_only\u003dTrue).filter_by("},{"line_number":1685,"context_line":"                       uuid\u003dinstance_uuid).first():"},{"line_number":1686,"context_line":"        raise exception.InstanceNotFound(instance_id\u003dinstance_uuid)"},{"line_number":1687,"context_line":""},{"line_number":1688,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3aaa91ec_1aa6e8ad","line":1685,"range":{"start_line":1685,"start_character":23,"end_line":1685,"end_character":41},"updated":"2016-06-24 01:33:38.000000000","message":"This will actually evaluate to None and instances.uuid is non-nullable, so I guess we\u0027ll just raise InstanceNotFound if values.get(\u0027instance_uuid\u0027) is None.","commit_id":"0c5ff5057edcf1f9ab55a559804a5c0c6a8158b2"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"dacc621be50d954bb5938d77100dcefc6cbdce0c","unresolved":false,"context_lines":[{"line_number":6809,"context_line":""},{"line_number":6810,"context_line":""},{"line_number":6811,"context_line":"@pick_context_manager_writer"},{"line_number":6812,"context_line":"def console_auth_token_create(context, values):"},{"line_number":6813,"context_line":"    instance_uuid \u003d values.get(\u0027instance_uuid\u0027)"},{"line_number":6814,"context_line":"    _check_instance_exists_in_project(context, instance_uuid)"},{"line_number":6815,"context_line":"    token_ref \u003d models.ConsoleAuthToken()"}],"source_content_type":"text/x-python","patch_set":15,"id":"3aaa91ec_2feb8c79","line":6812,"updated":"2016-06-24 13:32:23.000000000","message":"This is fine for now, but as mentioned in the objects patch we typically put these within the object using this now. It\u0027s easy enough to move it later though.","commit_id":"0c5ff5057edcf1f9ab55a559804a5c0c6a8158b2"}],"nova/tests/unit/db/test_db_api.py":[{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"2fe21ad7ad43c2aa4f90b2713f416f523d1423b2","unresolved":false,"context_lines":[{"line_number":10092,"context_line":"        db.console_auth_token_create(self.context, self.fake_token1)"},{"line_number":10093,"context_line":"        db.console_auth_token_create(self.context, self.fake_token2)"},{"line_number":10094,"context_line":""},{"line_number":10095,"context_line":"        db_obj1 \u003d db.console_auth_token_get(self.context, \u0027fake-token\u0027)"},{"line_number":10096,"context_line":"        db_obj2 \u003d db.console_auth_token_get(self.context, \u0027fake-token2\u0027)"},{"line_number":10097,"context_line":"        self.assertIsNotNone(db_obj1, \"token was not found in database\")"},{"line_number":10098,"context_line":"        self.assertIsNotNone(db_obj2, \"token was not found in database\")"},{"line_number":10099,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_298237c8","line":10096,"range":{"start_line":10095,"start_character":2,"end_line":10096,"end_character":72},"updated":"2016-05-23 15:02:58.000000000","message":"I\u0027d suggest to use something like this: self.fake_token1[\u0027token\u0027]\nself.fake_token2[\u0027token\u0027]\nwe are protect from typos and to any changes to the fake_console_auth_token object.","commit_id":"c9d83ebf3ede44adea3da9b482b464ec674e2233"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"2fe21ad7ad43c2aa4f90b2713f416f523d1423b2","unresolved":false,"context_lines":[{"line_number":10100,"context_line":"        db.console_auth_token_destroy_all_by_instance(self.context,"},{"line_number":10101,"context_line":"                                                      \u0027fake-uuid\u0027)"},{"line_number":10102,"context_line":""},{"line_number":10103,"context_line":"        db_obj3 \u003d db.console_auth_token_get(self.context, \u0027fake-token\u0027)"},{"line_number":10104,"context_line":"        db_obj4 \u003d db.console_auth_token_get(self.context, \u0027fake-token2\u0027)"},{"line_number":10105,"context_line":"        self.assertIsNone(db_obj3, \"token should not be found in database\")"},{"line_number":10106,"context_line":"        self.assertIsNone(db_obj4, \"token should not be found in database\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_69571f58","line":10104,"range":{"start_line":10103,"start_character":0,"end_line":10104,"end_character":72},"updated":"2016-05-23 15:02:58.000000000","message":"ditto","commit_id":"c9d83ebf3ede44adea3da9b482b464ec674e2233"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"4c5823c6a3708a72e06b0b17f830bc391585d9bc","unresolved":false,"context_lines":[{"line_number":10101,"context_line":"        self.context \u003d context.RequestContext(\u0027fake\u0027, \u0027fake\u0027)"},{"line_number":10102,"context_line":""},{"line_number":10103,"context_line":"    def test_console_auth_token_destroy_all_by_instance(self):"},{"line_number":10104,"context_line":"        uuid1 \u003d uuidsentinel.uuid1"},{"line_number":10105,"context_line":"        uuid2 \u003d uuidsentinel.uuid2"},{"line_number":10106,"context_line":"        hash1 \u003d self._hash(uuidsentinel.token1)"},{"line_number":10107,"context_line":"        hash2 \u003d self._hash(uuidsentinel.token2)"},{"line_number":10108,"context_line":"        hash3 \u003d self._hash(uuidsentinel.token3)"},{"line_number":10109,"context_line":"        self._create(hash1, uuid1, 100)"},{"line_number":10110,"context_line":"        self._create(hash2, uuid1, 100)"},{"line_number":10111,"context_line":"        self._create(hash3, uuid2, 100)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7aa08908_4b108859","line":10108,"range":{"start_line":10104,"start_character":0,"end_line":10108,"end_character":47},"updated":"2016-06-08 10:55:21.000000000","message":"minor: I think we could move the creation of UUID and hash in the setUp method just for saving some code duplication.","commit_id":"0660232377e0b4ff5ccf001bdd1af69606e3f50f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"073c1830c292baeab15b68b36544b2fc3c097612","unresolved":false,"context_lines":[{"line_number":9983,"context_line":"    def _create_instances(self, uuids):"},{"line_number":9984,"context_line":"        for uuid in uuids:"},{"line_number":9985,"context_line":"            db.instance_create(self.context,"},{"line_number":9986,"context_line":"                               {\u0027uuid\u0027: uuid, \u0027project_id\u0027: \u0027fake\u0027})"},{"line_number":9987,"context_line":""},{"line_number":9988,"context_line":"    def _create(self, token_hash, instance_uuid, expire_offset, host\u003dNone):"},{"line_number":9989,"context_line":"        t \u003d copy.deepcopy(fake_console_auth_token.fake_token_dict)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_4499446e","line":9986,"range":{"start_line":9986,"start_character":60,"end_line":9986,"end_character":66},"updated":"2016-06-21 21:27:35.000000000","message":"self.context.project_id for posterity?","commit_id":"0f477a34cb4dba080edb5a21220b3764939b2ee1"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"8e32261ed790f68378c3fd26626b3fd485682ff3","unresolved":false,"context_lines":[{"line_number":9983,"context_line":"    def _create_instances(self, uuids):"},{"line_number":9984,"context_line":"        for uuid in uuids:"},{"line_number":9985,"context_line":"            db.instance_create(self.context,"},{"line_number":9986,"context_line":"                               {\u0027uuid\u0027: uuid, \u0027project_id\u0027: \u0027fake\u0027})"},{"line_number":9987,"context_line":""},{"line_number":9988,"context_line":"    def _create(self, token_hash, instance_uuid, expire_offset, host\u003dNone):"},{"line_number":9989,"context_line":"        t \u003d copy.deepcopy(fake_console_auth_token.fake_token_dict)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_040d4e37","line":9986,"range":{"start_line":9986,"start_character":60,"end_line":9986,"end_character":66},"in_reply_to":"3aaa91ec_4499446e","updated":"2016-06-22 17:09:23.000000000","message":"Done","commit_id":"0f477a34cb4dba080edb5a21220b3764939b2ee1"}],"nova/utils.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bf609828371ae892d17680081d50291fa311d281","unresolved":false,"context_lines":[{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":""},{"line_number":1214,"context_line":"def get_sha256_str(base_str):"},{"line_number":1215,"context_line":"    \"\"\"Returns string that represents sha256 has of base_str (in hex format)."},{"line_number":1216,"context_line":""},{"line_number":1217,"context_line":"    sha1 and md5 are known to be breakable, so sha256 is a better option"},{"line_number":1218,"context_line":"    when the hash is being used for security purposes. If hashing passwords"}],"source_content_type":"text/x-python","patch_set":7,"id":"7aa08908_8f5d8a7b","line":1215,"updated":"2016-06-07 18:21:15.000000000","message":"s/has/hash/","commit_id":"0660232377e0b4ff5ccf001bdd1af69606e3f50f"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"fb5c4ddc08151af7bbcdbc61e9387adba91d55c3","unresolved":false,"context_lines":[{"line_number":1219,"context_line":"    or anything else that needs to be retained for a long period a salted"},{"line_number":1220,"context_line":"    hash is better."},{"line_number":1221,"context_line":"    \"\"\""},{"line_number":1222,"context_line":"    return hashlib.sha256(base_str).hexdigest()"},{"line_number":1223,"context_line":""},{"line_number":1224,"context_line":""},{"line_number":1225,"context_line":"def filter_and_format_resource_metadata(resource_type, resource_list,"}],"source_content_type":"text/x-python","patch_set":7,"id":"7aa08908_a0501b0c","line":1222,"updated":"2016-06-08 13:41:55.000000000","message":"ah, do need to encode strings here.","commit_id":"0660232377e0b4ff5ccf001bdd1af69606e3f50f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"3c5da5b91aa82cb5e223f5496150efc9cade404b","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"    return hashlib.md5(base_str).hexdigest()"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":""},{"line_number":1214,"context_line":"def get_sha256_str(base_str):"},{"line_number":1215,"context_line":"    \"\"\"Returns string that represents sha256 hash of base_str (in hex format)."},{"line_number":1216,"context_line":""},{"line_number":1217,"context_line":"    sha1 and md5 are known to be breakable, so sha256 is a better option"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_5f40f435","line":1214,"updated":"2016-06-09 13:44:50.000000000","message":"What about to enhance this method with an arg salt\u003d\"\" ? Then we can provide a new option for console to let operators opportunity to define it and so pass it to this method.","commit_id":"30470f113797ffd870488fc4b831c920aeff2424"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"699979a6e3a53e71edcbec642d32c8b29dd267fa","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"    return hashlib.md5(base_str).hexdigest()"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":""},{"line_number":1214,"context_line":"def get_sha256_str(base_str):"},{"line_number":1215,"context_line":"    \"\"\"Returns string that represents sha256 hash of base_str (in hex format)."},{"line_number":1216,"context_line":""},{"line_number":1217,"context_line":"    sha1 and md5 are known to be breakable, so sha256 is a better option"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_df9fc463","line":1214,"in_reply_to":"7aa08908_5f40f435","updated":"2016-06-09 13:47:48.000000000","message":"Thinking again... we are talking about temporary token, probably no need of such salt.","commit_id":"30470f113797ffd870488fc4b831c920aeff2424"},{"author":{"_account_id":7461,"name":"Paul Murray","email":"pmurray@hpe.com","username":"ptm"},"change_message_id":"8303c1ff8b477db4ee2552260c0361c19fae9604","unresolved":false,"context_lines":[{"line_number":1211,"context_line":"    return hashlib.md5(base_str).hexdigest()"},{"line_number":1212,"context_line":""},{"line_number":1213,"context_line":""},{"line_number":1214,"context_line":"def get_sha256_str(base_str):"},{"line_number":1215,"context_line":"    \"\"\"Returns string that represents sha256 hash of base_str (in hex format)."},{"line_number":1216,"context_line":""},{"line_number":1217,"context_line":"    sha1 and md5 are known to be breakable, so sha256 is a better option"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_25a35251","line":1214,"in_reply_to":"7aa08908_df9fc463","updated":"2016-06-09 15:06:54.000000000","message":"As it says in the docstring - glad we agree :)","commit_id":"30470f113797ffd870488fc4b831c920aeff2424"}]}
