A DESCRIPTION OF THE PROBLEM :
All of the following are parsed by UUID#fromString but are actually invalid:
0-0-0-0-0
+0000000-0000-0000-0000-000000000000
00000000-+000-0000-0000-000000000000
00000000-0000-+000-0000-000000000000
00000000-0000-0000-+000-000000000000
00000000-0000-0000-0000-+00000000000
0-0-0-0-0000000000000000000000000000
0000000000000000000000000000-0-0-0-0
Additionally all non-Latin1 digits and leading +/- signs are accepted due to the use of Long.parseLong that
uses Character.digit(ch, 16) to convert from characters.
All of the following are parsed by UUID#fromString but are actually invalid:
0-0-0-0-0
+0000000-0000-0000-0000-000000000000
00000000-+000-0000-0000-000000000000
00000000-0000-+000-0000-000000000000
00000000-0000-0000-+000-000000000000
00000000-0000-0000-0000-+00000000000
0-0-0-0-0000000000000000000000000000
0000000000000000000000000000-0-0-0-0
Additionally all non-Latin1 digits and leading +/- signs are accepted due to the use of Long.parseLong that
uses Character.digit(ch, 16) to convert from characters.
- clones
-
JDK-8257225 UUID#fromString Accepts Invalid Input
-
- Closed
-
- relates to
-
JDK-8159339 UUID:fromString() parses incorrect strings without error
-
- Closed
-
-
JDK-8257225 UUID#fromString Accepts Invalid Input
-
- Closed
-
- links to