)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"3af71105a04199badb3ec2a9c22793caa579b179","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"34d4b55b_bab84502","updated":"2026-10-21 16:55:08.000000000","message":"nits are not blocking since they refer to the logic that was there before, but maybe you can still look at them to address similar issues in the same logic","commit_id":"6eda6c9f1e1afab214e65a0a77b81209c37ca8e6"}],"keystone/common/fernet_utils.py":[{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"3af71105a04199badb3ec2a9c22793caa579b179","unresolved":true,"context_lines":[{"line_number":163,"context_line":"            # aren\u0027t keys (e.g. temporary files written by an external sync"},{"line_number":164,"context_line":"            # tool) are never opened and can\u0027t cause permission errors."},{"line_number":165,"context_line":"            try:"},{"line_number":166,"context_line":"                key_id \u003d int(filename)"},{"line_number":167,"context_line":"            except ValueError:  # nosec : name is not a number"},{"line_number":168,"context_line":"                continue"},{"line_number":169,"context_line":"            path \u003d os.path.join(key_repo, str(filename))"}],"source_content_type":"text/x-python","patch_set":1,"id":"e4d24a87_3ae8889a","line":166,"updated":"2026-10-21 16:55:08.000000000","message":"would be much better to use `filename.isdigit()` instead since \" 1\" is also accepted. I know it was there already, but if you change it would be good to make it safer","commit_id":"6eda6c9f1e1afab214e65a0a77b81209c37ca8e6"},{"author":{"_account_id":16011,"name":"James Denton","email":"james.denton@outlook.com","username":"busterswt"},"change_message_id":"f44934c03c2984a13cfbc735c17917f74a2678e8","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            # aren\u0027t keys (e.g. temporary files written by an external sync"},{"line_number":164,"context_line":"            # tool) are never opened and can\u0027t cause permission errors."},{"line_number":165,"context_line":"            try:"},{"line_number":166,"context_line":"                key_id \u003d int(filename)"},{"line_number":167,"context_line":"            except ValueError:  # nosec : name is not a number"},{"line_number":168,"context_line":"                continue"},{"line_number":169,"context_line":"            path \u003d os.path.join(key_repo, str(filename))"}],"source_content_type":"text/x-python","patch_set":1,"id":"4db4bf6d_da08ba5f","line":166,"in_reply_to":"e4d24a87_3ae8889a","updated":"2026-10-21 22:18:07.000000000","message":"Done, but with isascii() and isdigit(). Plain isdigit() is true for things like \u0027²\u0027, which int() then rejects.","commit_id":"6eda6c9f1e1afab214e65a0a77b81209c37ca8e6"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"3af71105a04199badb3ec2a9c22793caa579b179","unresolved":true,"context_lines":[{"line_number":166,"context_line":"                key_id \u003d int(filename)"},{"line_number":167,"context_line":"            except ValueError:  # nosec : name is not a number"},{"line_number":168,"context_line":"                continue"},{"line_number":169,"context_line":"            path \u003d os.path.join(key_repo, str(filename))"},{"line_number":170,"context_line":"            if os.path.isfile(path):"},{"line_number":171,"context_line":"                with open(path) as key_file:"},{"line_number":172,"context_line":"                    key \u003d key_file.read()"}],"source_content_type":"text/x-python","patch_set":1,"id":"0eb24683_e41f4ec9","line":169,"updated":"2026-10-21 16:55:08.000000000","message":"here also `str` is not necessary since `listdir` is already expected to return string. Was there already, but would be great to fix this","commit_id":"6eda6c9f1e1afab214e65a0a77b81209c37ca8e6"},{"author":{"_account_id":16011,"name":"James Denton","email":"james.denton@outlook.com","username":"busterswt"},"change_message_id":"f44934c03c2984a13cfbc735c17917f74a2678e8","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                key_id \u003d int(filename)"},{"line_number":167,"context_line":"            except ValueError:  # nosec : name is not a number"},{"line_number":168,"context_line":"                continue"},{"line_number":169,"context_line":"            path \u003d os.path.join(key_repo, str(filename))"},{"line_number":170,"context_line":"            if os.path.isfile(path):"},{"line_number":171,"context_line":"                with open(path) as key_file:"},{"line_number":172,"context_line":"                    key \u003d key_file.read()"}],"source_content_type":"text/x-python","patch_set":1,"id":"b96af626_f1884115","line":169,"in_reply_to":"0eb24683_e41f4ec9","updated":"2026-10-21 22:18:07.000000000","message":"Acknowledged","commit_id":"6eda6c9f1e1afab214e65a0a77b81209c37ca8e6"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"3af71105a04199badb3ec2a9c22793caa579b179","unresolved":true,"context_lines":[{"line_number":167,"context_line":"            except ValueError:  # nosec : name is not a number"},{"line_number":168,"context_line":"                continue"},{"line_number":169,"context_line":"            path \u003d os.path.join(key_repo, str(filename))"},{"line_number":170,"context_line":"            if os.path.isfile(path):"},{"line_number":171,"context_line":"                with open(path) as key_file:"},{"line_number":172,"context_line":"                    key \u003d key_file.read()"},{"line_number":173,"context_line":"                if len(key) \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"869fa0ed_42ebf923","line":170,"updated":"2026-10-21 16:55:08.000000000","message":"also: was there even before, but is maybe relevant. There is a race potential between `is_file` and `read`. It is just the similar typo of the problem you are addressing","commit_id":"6eda6c9f1e1afab214e65a0a77b81209c37ca8e6"},{"author":{"_account_id":16011,"name":"James Denton","email":"james.denton@outlook.com","username":"busterswt"},"change_message_id":"f44934c03c2984a13cfbc735c17917f74a2678e8","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            except ValueError:  # nosec : name is not a number"},{"line_number":168,"context_line":"                continue"},{"line_number":169,"context_line":"            path \u003d os.path.join(key_repo, str(filename))"},{"line_number":170,"context_line":"            if os.path.isfile(path):"},{"line_number":171,"context_line":"                with open(path) as key_file:"},{"line_number":172,"context_line":"                    key \u003d key_file.read()"},{"line_number":173,"context_line":"                if len(key) \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"d631b2da_2c733e93","line":170,"in_reply_to":"869fa0ed_42ebf923","updated":"2026-10-21 22:18:07.000000000","message":"Done. I dropped isfile() and handle FileNotFoundError on open() instead. Unreadable keys should still fail.","commit_id":"6eda6c9f1e1afab214e65a0a77b81209c37ca8e6"}]}
