We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems that UUID.info/1 parses every numeric string with length 16 as uuid.
UUID.info/1
elixir-uuid version 1.2.1:
UUID.info("0000000000000000") {:ok, [ uuid: "0000000000000000", binary: "0000000000000000", type: :raw, version: 3, variant: :reserved_ncs ]}
In elixir-uuid version 1.2.0 behaviour is different and numeric string is parsed correctly.
UUID.info("0000000000000000") {:error, "Invalid argument; Not a valid UUID: 0000000000000000"}
I was using UUID.info/1 to detect if arbitary string is uuid. From README:
UUID.info/1 returns a tuple of {:ok, info} for valid cases or {:error, reason} if the argument is not a UUID string.
The text was updated successfully, but these errors were encountered:
I explored info function and it seems that just validates the given UUID based on being a binary value. It'd be better to be validated with a Regex.
info
binary
Sorry, something went wrong.
Validate UUIDs with regex. (zyro#41)
fa3976b
Move variant and improve tests
75b2cb1
Successfully merging a pull request may close this issue.
It seems that
UUID.info/1
parses every numeric string with length 16 as uuid.elixir-uuid version 1.2.1:
In elixir-uuid version 1.2.0 behaviour is different and numeric string is parsed correctly.
I was using UUID.info/1 to detect if arbitary string is uuid.
From README:
The text was updated successfully, but these errors were encountered: