Skip to content

Commit

Permalink
fix(security): autofix Dangerous use of assert
Browse files Browse the repository at this point in the history
  • Loading branch information
aikido-autofix[bot] committed Feb 17, 2025
1 parent 525c8fe commit 2344eeb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vcon/vcon.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ def uuid8_time(custom_c_62_bits: int) -> str:
uuid_int |= custom_c_62_bits

uuid_str = str(uuid6.UUID(int=uuid_int, version=7))
assert uuid_str[14] == "7"
if uuid_str[14] != "7":
raise AssertionError("Expected '7' at position 14 in UUID string")
uuid_str = uuid_str[:14] + "8" + uuid_str[15:]

return uuid_str
Expand Down

0 comments on commit 2344eeb

Please sign in to comment.