The root cause is that:
uuid_obj = uuid.UUID('Eric Brown 72620 ')
will fail on the assembly or creation of the token, thus falling back to pure string user_id value.
But on the disassemble, a ValueError is not raised. This is because this user_id just happens to be 16 bytes, thus when casted into a byte string, it works fine and a UUID in hex is returned.
uuid_obj = uuid.UUID(bytes='Eric Brown 72620')
So any 16-character user_id would have the same issue.
The root cause is that:
uuid_obj = uuid.UUID('Eric Brown 72620 ')
will fail on the assembly or creation of the token, thus falling back to pure string user_id value.
But on the disassemble, a ValueError is not raised. This is because this user_id just happens to be 16 bytes, thus when casted into a byte string, it works fine and a UUID in hex is returned. bytes=' Eric Brown 72620')
uuid_obj = uuid.UUID(
So any 16-character user_id would have the same issue.